JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 140029
  • Score
    100M100P100Q178502F
  • License MIT

Webpack plugin that warns you when multiple versions of the same package exist in a build.

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

NPM version Downloads Build Status

Webpack plugin that warns you when multiple versions of the same package exist in a build.

duplicate-package-checker-webpack-plugin

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()
    ]
};