generate-license-file-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

3.4.0 • Public • Published

generate-license-file-webpack-plugin

Webpack plugin to generate a text file asset containing all of the licenses for your production third-party dependencies.

npm CodeCov

Based on the npm package generate-licence-file.
Currently supports Webpack v5.

Usage

To use the default configuration, construct the plugin in your webpack plugins array:

// webpack.config.js
const { LicenseFilePlugin } = require("generate-license-file-webpack-plugin");

module.exports = {
  plugins: [new LicenseFilePlugin()],
};

The plugin can be configured using the following options. Below shows the default values:

// webpack.config.js
const { LicenseFilePlugin } = require("generate-license-file-webpack-plugin");

module.exports = {
  plugins: [
    new LicenseFilePlugin({
      outputFileName: "third-party-licenses.txt",
      outputFolder: "./", // Relative to your build output directory
      pathToPackageJson: "./package.json",
      isDev: false, // When true, uses placeholder content to reduce compilation time
      lineEnding: undefined, // Can be 'windows' or 'posix'. If omitted, the system default will be used
    }),
  ],
};

Building the plugin yourself

npm install
npm run build

License

generate-license-file-webpack-plugin is licensed under the ISC License.

Package Sidebar

Install

npm i generate-license-file-webpack-plugin

Weekly Downloads

383

Version

3.4.0

License

ISC

Unpacked Size

15.9 kB

Total Files

24

Last publish

Collaborators

  • tobybessant
  • tobysmith568