You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CLI build process creates the file 3rdpartylicenses.txt when the configuration is set to 'production' or includes "extractLicenses": true.
Prior to the new build system, 3rdpartylicenses.txt was saved to the root of the build output, typically .\dist\my-project. This allowed it to be included by default in any distribution.
With the introduction of the new build system, the build process now saves the compiled output to .\dist\my-project\browser, but 3rdpartylicenses.txt is still being saved to .\dist\my-project, meaning that it is no longer included with the project output. If it needs to be distributed as part of the application, it now needs an additional build step to copy it into the browser subfolder.
Expected behavior
Under the new build system, 3rdpartylicenses.txt should be saved to the root of the same folder as the compiled output.
Steps to reproduce
ng new extract-licenses --style=css --skip-git=true
cd extract-licenses
ng build --configuration=production
dir .\dist\extract-licenses
This should display 3rdpartylicenses.txt and the browser folder. (Listing the contents of the browser folder will list the application files.)
I don't necessarily need it to be servable, I just want it to be included in the application's files for
distribution.
[That said, it's entirely possible that an application may wish to include/display the contents of 3rdpartylicenses.txt alongside its own licence somewhere. But being able to display or serve the file directly is not the issue here; just the ability to have it included in the output folder.]
A number of licences include a provision requiring copyright notices, etc, to be included in the final software product; for example, the MIT licence states:
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software."
This may often be ignored when building server-hosted web apps (because the developer manages all copies of the final application), but when Angular is used to build, say, mobile apps, e.g. using Ionic, the software is being distributed to each end user. In these circumstances, the developer is required to provide a copy of the licence(s) as part of the application and AIUI, including 3rdpartylicenses.txt with the compiled output would satisfy that requirement.
The CLI build process creates the file 3rdpartylicenses.txt when the configuration is set to 'production' or includes
"extractLicenses": true
.Prior to the new build system, 3rdpartylicenses.txt was saved to the root of the build output, typically .\dist\my-project. This allowed it to be included by default in any distribution.
With the introduction of the new build system, the build process now saves the compiled output to .\dist\my-project\browser, but 3rdpartylicenses.txt is still being saved to .\dist\my-project, meaning that it is no longer included with the project output. If it needs to be distributed as part of the application, it now needs an additional build step to copy it into the browser subfolder.
Expected behavior
Under the new build system, 3rdpartylicenses.txt should be saved to the root of the same folder as the compiled output.
Steps to reproduce
This should display 3rdpartylicenses.txt and the browser folder. (Listing the contents of the browser folder will list the application files.)
Output from
ng version
:The text was updated successfully, but these errors were encountered: