Skip to content

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

@timhwang21

Description

@timhwang21

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions