Skip to content
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

Fix error with formatWebpackMessages trimming warnings #4656

Closed

Conversation

marcofugaro
Copy link
Contributor

@marcofugaro marcofugaro commented Jun 20, 2018

Hey, I've been using the updated react-dev-utils and found a bug in formatWebpackMessages that happens with newer webpack versions.

Basically webpack (or the thread-loader) in the stats.toJson().warnings now outputs also this line, containing a Module Warning or Module Error (?):

Module Warning (from ./node_modules/thread-loader/dist/cjs.js):

so the lines array now becomes this (see second line):

screen shot 2018-06-20 at 19 02 19

instead of the old one

screen shot 2018-06-20 at 19 02 32

This fucks with the thread-loader message remover and actually removes the body of the warning.

This PR checks if that line is present and removes it since it's not relevant to the user.

@iansu
Copy link
Contributor

iansu commented Jun 28, 2018

This seems like a good fix. I'd like to get the test passing before merging it though. We're currently working on fixing the tests.

@marcofugaro
Copy link
Contributor Author

Do you guys think we should check also for /thread.loader/i in that line just to be extra sure?

@marcofugaro
Copy link
Contributor Author

Done it, I think it makes sense if seomhow the Module Error message changes

@marcofugaro
Copy link
Contributor Author

Another case with the thread loader happened, this one happens when there are issues in the build, not the user code. Here is the lines array of when this happens

screen shot 2018-07-10 at 11 43 27

The error message was clipped also in this case, fixed it in fdcdd9a

@Timer
Copy link
Contributor

Timer commented Sep 21, 2018

This is fixed in next, thanks!

@Timer Timer closed this Sep 21, 2018
webOS101 pushed a commit to enactjs/cli that referenced this pull request Oct 4, 2018
* Initial implementation of Webpack 4 support.

* Updated console-snoop, mocha-react-proptype-checker, and sinon

* Workaround for incorrectly parsed error/warning stats until facebook/create-react-app#4656 is merged into react-dev-utils.

* Update all remaining dependencies to latest releases.

* Remove karma-dirty-chai (abandoned)

* Use dirty-chai directly (rather than karma-dirty-chai plugin), redirect sinon requests to the prebuilt bundle (rather than esm bundle), hide performance output, simplify output to errors only, and update webpack config to support webpack 4.

* Temporary workaround until karma-webpack issues are resolved and update published to NPM.

* Updated dependencies.

* Updates and fixed support for webpack import() syntax.

* Babel cleanup, remove unneeded plugins, add react preset options, use loose option on class properties, and fix spacing

* Support full browserslist format

* Webpack message format fix has landed upstream

* Webpack v4.19.1 added 'browser' mainfield support for electron-renderer

* Updated dependencies

* Switch from UglifyJsPlugin to TerserPlugin, as uglify-es was discontinued and terser is the new community-driven fork.

* Fix css extension for chunk stylesheets

* @enact/dev-utils 2.0.0 release update
@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants