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.

npm install suppress-chunks-webpack-plugin
yarn add suppress-chunks-webpack-plugin
pnpm add suppress-chunks-webpack-plugin

Suppress output files for entry chunks 'one' and 'foo' in a webpack 3 configuration using CommonJS require.

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