mariusbalcytis / webpack-bundle

Bundle to Integrate Webpack into Symfony
MIT License
122 stars 36 forks source link

Support for syntax error overlay #32

Closed jrysig closed 7 years ago

jrysig commented 7 years ago

Is it possible to support syntax error overlay in webpack-bundle? It is implemented in webpack-hot-middleware: https://github.com/glenjamin/webpack-hot-middleware/issues/9 or Create React App: https://github.com/facebookincubator/create-react-app/pull/744

I did try to use webpack-error-notification plugin but error overlay displayed directly in browser seems like better solution.

mariusbalcytis commented 7 years ago

First one, as I understand, is not compatible with webpack-dev-server, which does many more things than just hot-reloading, so taking it out and rolling out some alternative seems overkill for overlay notifications. Second one does not come as separate component and is React specific.

Currently webpack-dev-server client displays errors in console. Maybe some abstract solution to show any console error as a browser notification etc. would be a solution?

Webpack-dev-server gives socket to listen to events (this is done by webpack-dev-server client), but I'm not sure whether it would clash with client or could work as a separate, additional library.

mariusbalcytis commented 7 years ago

webpack-dev-server supports this from 2.3 version. Webpack 2 default configuration enables this automatically - just update the bundle (see upgrade.md) and run maba:webpack:setup to update package.json and webpack configuration.