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

webpack --profile outputs invalid JSON when ENV not set #193

Closed
timhwang21 opened this issue Dec 4, 2017 · 4 comments
Closed

webpack --profile outputs invalid JSON when ENV not set #193

timhwang21 opened this issue Dec 4, 2017 · 4 comments

Comments

@timhwang21
Copy link

Hi, I am not sure this repository is the correct place to file this issue, if it's not I would appreciate being pointed in the right direction. Thanks!

Do you want to request a feature or report a bug?
Bug / BUX

What is the current behavior?

If the current behavior is a bug, please provide the steps to reproduce.
When running webpack --profile and ENV isn't set, the string WARN: webpack env is not set, assuming local is appended to the top of the outputted stats.json. This leads to the JSON being invalid, which while easy to manually fix, is annoying. For example this affects things like the Webpack bundle analyzer plugin.

If invalid JSON is intended to ensure the user checks it out, please close this issue 😀

What is the expected behavior?
Valid JSON is outputted.

If this is a feature request, what is motivation or use case for changing the behavior?
Maybe the warning could be output in the command line instead of in the file.

Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.

@evenstensberg
Copy link
Member

Hey @timhwang21 , let me investigate and get back to you!

@itsMapleLeaf
Copy link
Contributor

itsMapleLeaf commented Jan 30, 2018

@timhwang21 I can't reproduce this in v3 or v4. Could you create a repo to illustrate the issue? Also include the webpack version you're using.

@ematipico
Copy link
Contributor

@timhwang21 are there any updates on this? Unfortunately I can't reproduce the issue

@timhwang21
Copy link
Author

Hi, unfortunately I haven't had time to look into this, and probably won't for the near future. I encountered this when profiling a large application whose build process is a mix of gulp and various webpack versions, so its very likely the problem is on my end.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants