{"library":"peer-deps-externals-webpack-plugin","title":"peer-deps-externals-webpack-plugin","description":"Webpack plugin (v1.0.4) that automatically adds a library's peerDependencies to webpack's externals configuration, preventing them from being bundled. This keeps bundle size minimal and avoids duplicate dependencies when the library is consumed. Requires webpack >=2.0.0. A lightweight alternative to manually listing externals or using other dependency exclusion plugins. Stable with no active development.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install peer-deps-externals-webpack-plugin"],"cli":null},"imports":["const PeerDepsExternalsPlugin = require('peer-deps-externals-webpack-plugin');","const { PeerDepsExternalsPlugin } = require('peer-deps-externals-webpack-plugin');","import PeerDepsExternalsPlugin from 'peer-deps-externals-webpack-plugin';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\nconst PeerDepsExternalsPlugin = require('peer-deps-externals-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: __dirname + '/dist',\n    filename: 'bundle.js',\n    libraryTarget: 'commonjs2', // or 'umd' for libraries\n  },\n  plugins: [\n    new PeerDepsExternalsPlugin(),\n  ],\n};","lang":"javascript","description":"Configures webpack to automatically exclude peer dependencies from the bundle using PeerDepsExternalsPlugin.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}