diff --git a/content/plugins/no-emit-on-errors-plugin.md b/content/plugins/no-emit-on-errors-plugin.md new file mode 100644 index 000000000000..ded6a7826502 --- /dev/null +++ b/content/plugins/no-emit-on-errors-plugin.md @@ -0,0 +1,15 @@ +--- +title: NoEmitOnErrorsPlugin +contributors: + - simon04 +--- + +```javascript +new webpack.NoEmitOnErrorsPlugin() +``` + +Use the `NoEmitOnErrorsPlugin` to skip the emitting phase whenever there are errors while compiling. This ensures that no assets are emitted that include errors. The `emitted` flag in the stats is `false` for all assets. + +If you are using the [CLI](/api/cli/), the webpack process will not exit with an error code by enabling this plugin. If you want webpack to "fail" when using the CLI, please check out the [`bail` option](/api/cli/#advanced-options). + +Note: This supersedes the (now deprecated) webpack 1 plugin `NoErrorsPlugin`.