From dfa02cf2a29d3de3d55499dc8e961ee644cb47a1 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 19 Apr 2017 20:02:37 +0200 Subject: [PATCH] Add NoEmitOnErrorsPlugin documentation --- content/plugins/no-emit-on-errors-plugin.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 content/plugins/no-emit-on-errors-plugin.md 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`.