-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use friendly-errors-webpack-plugin to display friendlier errors #499
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
This also delegates the black magic to a thoroughly tested third party. See https://github.com/geowarin/friendly-errors-webpack-plugin.
82566fb
to
17bd920
Compare
😆 I've just seen the ${serverPort} message thing in the demo. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Just went through the whole code and love how clean it is! After Andrew's tweet I had a go at this myself, but your plugin is way easier to read and better structured. Really awesome stuff! |
@marvinhagemeister Thanks! I have to mention @rogeliog who came up with the transformer/formatter idea. Anyway, for the moment it's about as hacky as was @gaearon's code. All things considered, I think everybody would be happier if we didn't have to come up with a plugin for this. |
Thank you for the PR. At the time when we were discussing this, I wasn’t really sure how CRA would evolve and this seemed like a good idea. However I later began to realize I want more granular control over this code. In particular, I wanted the following properties:
As a result, Webpack plugin didn’t seem like the right thing to do to me, and I implemented this in a separate package called I implemented filtering of the messages (with additional fixes) in Please feel free to use it in your projects too! And if you could backport your tests to Sorry about the wasted effort! |
This delegates the black magic involved in analysing webpack errors to a thoroughly tested third party.
See https://github.com/geowarin/friendly-errors-webpack-plugin.
Demo
Success:
Module not found:
Lint warnings:
Babel error