A webpack plugin that prevents specified asset bundles from being emitted by the compiler. Version 4.0.1 supports webpack 5 and Node >= 10.13.0. Key differentiator: it removes output files (e.g., JavaScript stubs generated from CSS entry points) without affecting the compilation process. The plugin accepts a string or array of asset names to block. It is commonly used with MiniCssExtractPlugin to suppress unwanted JS output. The project has a slow release cadence (last release 2021). Webpack 4 users must pin to version 3.0.0.
npm install no-emit-webpack-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Suppress the 'style.js' output generated from a CSS entry point using MiniCssExtractPlugin.
Pin to 'no-emit-webpack-plugin@3.0.0' for Webpack 4 projects.
Ensure array argument has at least one string element.
Upgrade Node.js to >=10.13.0 or use v3.0.0.
Always pass string or array of strings.
Use const NoEmitPlugin = require('no-emit-webpack-plugin');Downgrade to no-emit-webpack-plugin@3.0.0 for Webpack 4.