Skip to content

Commit 50358c0

Browse files
simon04skipjack
authored andcommitted
docs(plugins): add NoEmitOnErrorsPlugin documentation
1 parent b3a81e7 commit 50358c0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: NoEmitOnErrorsPlugin
3+
contributors:
4+
- simon04
5+
---
6+
7+
```javascript
8+
new webpack.NoEmitOnErrorsPlugin()
9+
```
10+
11+
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.
12+
13+
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).
14+
15+
Note: This supersedes the (now deprecated) webpack 1 plugin `NoErrorsPlugin`.

0 commit comments

Comments
 (0)