duplicate-package-checker-webpack-plugin
![Build Status](https://travis-ci.org/darrenscerri/duplicate-package-checker-webpack-plugin.svg?branch=master)
Webpack plugin that warns you when multiple versions of the same package exist in a build.
![duplicate-package-checker-webpack-plugin](https://cloud.githubusercontent.com/assets/729230/24270619/357ebc62-1016-11e7-9b04-f79fd5a72db7.png)
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({
verbose: true,
ignore: ["warning", "query-string"]
})