suppress-chunks-webpack-plugin
raw JSON → 1.0.6 verified Sat Apr 25 auth: no javascript maintenance
Webpack plugin (v1.0.6) to suppress output files for specified entry chunks, useful when only certain chunk files (e.g., CSS, JS) are needed. Allows regex-based filtering per chunk or globally. No updates since 2017; works with webpack 3 and lower. A niche alternative to webpack's built-in entry options or custom output configuration.
Install
npm install suppress-chunks-webpack-plugin yarn add suppress-chunks-webpack-plugin pnpm add suppress-chunks-webpack-plugin Imports
- SuppressChunksPlugin wrong
import SuppressChunksPlugin from 'suppress-chunks-webpack-plugin';correctvar SuppressChunksPlugin = require('suppress-chunks-webpack-plugin');
Quickstart
var SuppressChunksPlugin = require('suppress-chunks-webpack-plugin');
module.exports = {
entry: {
one: './file.js',
foo: './foo.js',
bar: './bar.js',
main: './index.js',
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
},
plugins: [
new SuppressChunksPlugin(['one', 'foo'])
]
};