The NoEmitOnErrorsPlugin
allows you to avoid emitting assets when there are any errors. Enabled by default, you can disable using optimization.emitOnErrors
webpack.config.js
module.exports = {
plugins: [new webpack.NoEmitOnErrorsPlugin()],
};
Webpack 5 现已正式发布。请阅读我们的 发布公告。如还未准备升级,请阅读 webpack 4 文档。