Package Exports
- duplicate-package-checker-webpack-plugin
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (duplicate-package-checker-webpack-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
duplicate-package-checker-webpack-plugin
Webpack plugin that warns you when multiple versions of the same package exist in a build.
Why?
It might be possible that a single package gets included multiple times in a Webpack build due to different package versions. This situation may happen without any warning, resulting in extra bloat in your build and may lead to hard-to-find bugs.
This plugin will warn you of such cases to minimize build size and avoid bugs caused by unintended duplicate packages.
Motivation: https://github.com/webpack/webpack/issues/385 and https://github.com/webpack/webpack/issues/646.
Install
npm install duplicate-package-checker-webpack-plugin --save-dev
Configuration
Add the plugin to your webpack config:
var DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
module.exports = {
plugins: [
new DuplicatePackageCheckerPlugin()
]
};
You can also pass an object with configurable options:
new DuplicatePackageCheckerPlugin({
// Also show module that is requiring each duplicate package
verbose: true
})