-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Upstream parts of react-dev-utils #5409
Comments
I don't think it's likely, but we can try. We're very opinionated on how we strip down the errors. Maybe if webpack added a IIRC, we were mostly talking about the ModuleNotFoundPlugin ( |
Glancing at the formatter it seems a good start would be for webpack to add a stats option that controlled whether the "Module: ..." boilerplate was added or not, and perhaps even allow loaders to declare that their output should not be wrapped (which would allow eg eslint-loader to disable it, given the filepath etc is repeated within its own message).
Ah, yes. I'm happy to morph this issue into a general "upstream parts of It just would be a real shame for {CRA, Neutrino, vue-cli, ...} to all have to implement their own custom fixes for issues that could be upstreamed and benefit the community as a whole :-) |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
(not stale) |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
|
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
|
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
We're going to be shipping a package that does this soon. I'll close this issue b/c it's become noise at this point. Will ping you, @edmorley! |
Awesome - thank you :-) |
By shipping a package, do you mean "try where possible to fix things upstream (or at least file issues against them), and only then ship a package"? ;-) |
Will start with a webpack plugin that completely massages the messages (likely) then upstream from there. |
Remember, a lot of what we format is super opinionated and not a good fit for all projects. We'll play it by ear! |
The
react-dev-utils
package currently includes a webpack message formatter that aims to clean up the console output, smoothing over some of its rough edges:https://github.com/facebook/create-react-app/blob/master/packages/react-dev-utils/formatWebpackMessages.js
https://github.com/facebook/create-react-app/tree/master/test/fixtures/webpack-message-formatting
It would be great to upstream these fixes to webpack/the various loaders so the whole webpack community can benefit, whilst also reducing the maintenance burden for the CRA team - as mentioned in:
#5174 (comment)
CC @Timer :-)
The text was updated successfully, but these errors were encountered: