feat(@angular-devkit/build-angular): implement node module license extraction for esbuild builder #24473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using the experimental esbuild-based browser application builder, the
--extract-licensesoption 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_modulesis used to indicate that a file belongsto a package and its license should be include in the output licenses file.
The package name and license field are extracted from the
package.jsonfile for thepackage. If a license file (e.g.,
LICENSE) is present in the root of the package, itwill 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 theoutput 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.