Disables saving output files in Webpack v5.x+.
npm i -D disable-output-plugin
import * as DisableOutputPlugin from 'disable-output-plugin';
module.exports = {
plugins: [
// 'index.js' is the output filename
new DisableOutputPlugin({ test: /^index\.js$/i })
]
}
module.exports = {
plugins: [
new DisableOutputPlugin({ test: /\.js$/i })
]
}