mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 11:44:05 +08:00
When using the experimental esbuild-based browser application builder, the `--extract-licenses` option will now generate an output licenses file when enabled. This option extracts license information for each node module package included in the output files of the built code. This includes JavaScript and CSS output files. The esbuild metafile information generated during the bundling steps is used as the source of information regarding what input files where included and where they are located. A path segment of `node_modules` is used to indicate that a file belongs to a package and its license should be include in the output licenses file. The package name and license field are extracted from the `package.json` file for the package. If a license file (e.g., `LICENSE`) is present in the root of the package, it will also be included in the output licenses file. Custom licenses as defined by the recommended npm custom license text (`SEE LICENSE IN <filename>`) will also be extracted and included in the output license file. For additional information regarding the license field in a `package.json`, see https://docs.npmjs.com/cli/v9/configuring-npm/package-json#license.