UNPKG

2.92 kBMarkdownView Raw
1# Migration Guide
2
3## 3.x to 4.x
4* Support for webpack 4 and below are now removed. Please use an older version of the plugin if you need it to work with webpack 4 or below.
5
6## 2.x to 3.x
7* Most builds can upgrade directly from 2.x to 3.x without having to change anything.
8* The `webpack-sources` package is no longer bundled with the plugin nor listed as a peerDependency of the plugin. This allows the plugin to use the same version of `webpack-sources` that comes with the `webpack` installation.
9
10## 1.x to 2.x
11* The plugin no longer requires any explicit configuration. By default it will pick up all license types.
12* The plugin no longer writes warnings/errors directly to console and instead reports warnings/errors to webpack.
13* The `modulesDirectories` option defaults to null and requires full paths if specified. When `modulesDirectories` is null, third-party modules may be picked up from any directory.
14* The following options have been removed:
15 - `buildRoot` - The plugin can work reliably without this option having to be specified now. You can remove it from your configuration.
16 - `suppressErrors` - Use the `stats` option on the plugin config instead to turn off warnings/errors.
17 - `pattern` - Use the new `licenseInclusionTest` option instead.
18 - `outputTemplate` - Use the new `renderLicenses` option instead.
19 - `includePackagesWithoutLicense` - Use the new `licenseInclusionTest` option instead.
20 - `unacceptablePattern` - Use the new `unacceptableLicenseTest` option instead.
21 - `abortOnUnacceptableLicense` - The plugin will send an error to webpack whenever an unacceptable license is found. Use the new `handleUnacceptableLicense` option if you want to do something in addition to that.
22 - `bannerTemplate` - Use the new `renderBanner` option instead.
23 - `includedChunks` - Use the new `chunkIncludeExcludeTest` option instead.
24 - `excludedChunks` - Use the new `chunkIncludeExcludeTest` option instead.
25 - `additionalPackages` - Use the new `additionalChunkModules` or `additionalModules` option instead.
26* Check the [documentation](DOCUMENTATION.md) for information on how to use the new options.
27
28## 0.6.x to 1.x
29
30* Change `require('license-webpack-plugin')` to `require('license-webpack-plugin').LicenseWebpackPlugin`.
31* Change `includeUndefined` in the plugin options to `includePackagesWithoutLicense`.
32* The following options have been removed:
33 - `addVersion` - Use the new `outputTemplate` option to configure an ejs template to be used for writing the output.
34 - `addLicenseText` - Use the new `outputTemplate` option to configure an ejs template to be used for writing the output.
35 - `addUrl` - Use the new `outputTemplate` option to configure an ejs template to be used for writing the output.
36 - `filename` - The plugin outputs an individual file per chunk now and is configured by the `outputFilename` option. Check the `README.md` file to see how it works.