Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack when to use `NoErrorsPlugin`?

Tags:

webpack

After read the NoErrorsPlugin docs.

When there are errors while compiling this plugin skips the emitting phase (and recording phase), so there are no assets emitted that include errors.

Still, don't understand. How to use it?

I made a syntax error, but it seems there is nothing different before I enable NoErrorsPlugin.

like image 345
slideshowp2 Avatar asked Oct 17 '16 07:10

slideshowp2


1 Answers

I was reading the answer, but still don't get it. Here is what I found.

webpack.NoErrorsPlugin() is an optional plugin that tells the reloader to not reload if there is an error. The error is simply printed in the console, and the page does not reload. If you do not have this plugin enabled and you have an error, a red screen of death is thrown.

Copy from here

like image 151
kenpeter Avatar answered Sep 19 '22 15:09

kenpeter