question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upstream parts of react-dev-utils

See original GitHub issue

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: https://github.com/facebook/create-react-app/pull/5174#issuecomment-425749074

CC @Timer 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
edmorleycommented, Oct 11, 2018

I don’t think it’s likely, but we can try. We’re very opinionated on how we strip down the errors.

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).

IIRC, we were mostly talking about the ModuleNotFoundPlugin

Ah, yes. I’m happy to morph this issue into a general “upstream parts of react-dev-utils” issue - reading through the various files in there, many are really bug fixes that belong upstream (or in some cases might have been fixed already – WatchMissingNodeModulesPlugin sounds related to the issue fixed in webpack/watchpack#69 for example).

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 😃

0reactions
Timercommented, Feb 14, 2019

Remember, a lot of what we format is super opinionated and not a good fit for all projects. We’ll play it by ear!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-dev-utils - npm
webpack utilities used by Create React App. Latest version: 12.0.1, ... Start using react-dev-utils in your project by running `npm i ...
Read more >
Lifting State Up - React
Often, several components need to reflect the same changing data. We recommend lifting the shared state up to their closest common ancestor.
Read more >
Instruction | Build Web Apps with React in Pittsburgh ...
Start thinking in React, master JavaScript ES6+ builtin functions and write & refactor HTML into JSX syntax. Local Development, Components & ...
Read more >
Don't use create-react-app: How you can set up your own ...
We created a HelloWorld.js react component, ran it using dev server, and build it. We created an executable JS file and mapped it...
Read more >
React Native · Learn once, write anywhere
React components wrap existing native code and interact with native APIs via React's declarative UI paradigm and JavaScript. This enables native app development...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found