
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
license-webpack-plugin
Advanced tools
Manage third-party license compliance in your webpack build.
npm install license-webpack-plugin --save-dev
To use the plugin, simply add it to the plugins section in the webpack config.
Example:
const LicenseWebpackPlugin = require('license-webpack-plugin').LicenseWebpackPlugin;
module.exports = {
plugins: [
new LicenseWebpackPlugin()
]
};
The default behavior will add a license notice file to each chunk of the webpack build. In addition, it will add a banner indicating the path to the license notice file in any Javascript assets. Third party libraries imported via external tools like SASS @import may not appear in the output (since webpack does not process @import). If this issue happens, please specify additional modules that the plugin should scan.
To configure the plugin, check the documentation.
yarn
yarn build
Migration guides for breaking changes are documented here.
The changelog can be found here.
Similar to license-webpack-plugin, webpack-license-plugin also helps in managing licenses for third-party dependencies. It can generate a third-party notices file including all licenses. It differs in the way it handles the output and configuration options.
This plugin is another alternative that scans your node_modules directory to check for licenses and outputs a summary of the license information. It is less focused on bundling the licenses with the webpack output and more on reporting and compliance.
FAQs
Outputs licenses from 3rd party libraries to a file
The npm package license-webpack-plugin receives a total of 3,202,280 weekly downloads. As such, license-webpack-plugin popularity was classified as popular.
We found that license-webpack-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.