{"library":"no-emit-webpack-plugin","title":"No Emit Webpack Plugin","description":"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.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install no-emit-webpack-plugin"],"cli":null},"imports":["import NoEmitPlugin from 'no-emit-webpack-plugin'","const NoEmitPlugin = require('no-emit-webpack-plugin')","import type { NoEmitPlugin } from 'no-emit-webpack-plugin'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const MiniCssExtractPlugin = require('mini-css-extract-plugin');\nconst NoEmitPlugin = require('no-emit-webpack-plugin');\n\nmodule.exports = {\n  entry: {\n    style: './src/style.css',\n    main: './src/main.js',\n  },\n  module: {\n    rules: [{\n      test: /\\.css$/iu,\n      use: [MiniCssExtractPlugin.loader, 'css-loader'],\n    }],\n  },\n  plugins: [\n    new MiniCssExtractPlugin({ filename: '[name].css' }),\n    new NoEmitPlugin('style.js'),  // suppresses the JS stub for style.css\n  ],\n};","lang":"javascript","description":"Suppress the 'style.js' output generated from a CSS entry point using MiniCssExtractPlugin.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}