Socket
Socket
Sign inDemoInstall

duplicate-package-checker-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duplicate-package-checker-webpack-plugin

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


Version published
Maintainers
1
Created

What is duplicate-package-checker-webpack-plugin?

The duplicate-package-checker-webpack-plugin is a Webpack plugin that helps identify and eliminate duplicate packages in your Webpack bundle. This can help reduce bundle size and avoid potential issues caused by multiple versions of the same package.

What are duplicate-package-checker-webpack-plugin's main functionalities?

Basic Usage

This code demonstrates the basic usage of the plugin. By adding the DuplicatePackageCheckerPlugin to the plugins array in your Webpack configuration, it will automatically check for duplicate packages in your bundle.

const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');

module.exports = {
  // other webpack configuration
  plugins: [
    new DuplicatePackageCheckerPlugin(),
  ],
};

Emit Errors for Duplicates

This code sample shows how to configure the plugin to emit errors when duplicates are found. This can be useful for CI/CD pipelines to ensure that no duplicate packages are introduced.

const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');

module.exports = {
  // other webpack configuration
  plugins: [
    new DuplicatePackageCheckerPlugin({
      emitError: true,
    }),
  ],
};

Verbose Output

This code demonstrates how to enable verbose output, which provides more detailed information about the duplicates found in your bundle.

const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');

module.exports = {
  // other webpack configuration
  plugins: [
    new DuplicatePackageCheckerPlugin({
      verbose: true,
    }),
  ],
};

Other packages similar to duplicate-package-checker-webpack-plugin

Keywords

FAQs

Package last updated on 20 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc