KyleAMathews / coffee-react-quickstart

Quickstart for building React single page apps using Coffeescript, Gulp, Webpack, and React-Router
http://kyleamathews.github.io/coffee-react-quickstart
MIT License
254 stars 41 forks source link

NoErrorsPlugin is not needed with hot/only-dev-server #24

Closed gaearon closed 9 years ago

gaearon commented 9 years ago

This is something silly I've been doing and recommending for a long time. Sorry! There's no need for NoErrorsPlugin if you use hot/only-dev-server. Hot updates won't blow your app away if you make a syntax error, but at least you'll see the error in the DevTools console! And the subsequent hot updates will just work when you fix that error.

Please verify that this is indeed the case for you. (I don't know, it certainly works this way for my projects, but then maybe Webpack changed the behavior in some version? Just make sure it really works as I describe above.)

KyleAMathews commented 9 years ago

Quick test verified it is indeed not needed. Thanks!

KyleAMathews commented 9 years ago

(though errors showed up in the console regardless—at least within React components where they're not executed until they reach the browser)

gaearon commented 9 years ago

Hmm.. With NoErrorsPlugin, I'd just see Nothing updated. in devtools if I have a syntax error.

gaearon commented 9 years ago

(I mean real syntax errors like errors at the parser level)

gaearon commented 9 years ago

Oh wait, looks like I didn't check closely enough.

NoErrorsPlugin helped against HMR breaking when you misspell a module name. Maybe you should revert :-(

I'm probably going to raise an issue because I want a mix of both behaviors. Always write to console, but don't break on missing files..