A webpack plugin that extracts third-party library license information and outputs it to a file or adds a banner. Current stable version is 4.0.2. It supports webpack 4 and 5, outputs licenses per chunk or aggregated, and allows exclusion/inclusion patterns. Compared to alternatives, it offers comprehensive configuration for license compliance in webpack builds.
npm install license-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Creates a webpack plugin instance that writes a licenses.txt file, marks GPL and AGPL licenses as unacceptable, and customizes the license output format.
Manually specify additional modules using the `additionalModules` option.
Upgrade webpack to version 4 or 5, or use an older version of the plugin (e.g., 2.x) for webpack 3.
Set `addBanner: false` in plugin options to suppress banner injection.
Update import from default import to named import: `const { LicenseWebpackPlugin } = require('license-webpack-plugin')`Use `const { LicenseWebpackPlugin } = require('license-webpack-plugin')` or `import { LicenseWebpackPlugin } from 'license-webpack-plugin'`Run `npm install --save-dev license-webpack-plugin`
Use `licenseTypeOverrides` option to manually specify licenses for such packages.