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

Switch to console.error #10

Merged
merged 1 commit into from
Feb 6, 2019
Merged

Switch to console.error #10

merged 1 commit into from
Feb 6, 2019

Conversation

CyberAP
Copy link
Contributor

@CyberAP CyberAP commented Feb 5, 2019

As described in the webpack/webpack-cli#737 console.log corrupts the final json file provided by the --json option.
They fixed this by switching to console.error as seen in this pull request: webpack/webpack-cli#744

I believe the same thing should be done here, since I'm having this line in my json file:

webpack-fix-style-only-entries: removing js from style only module: javascripts/appStyles-78c8323b9a1489caa5b8.js

As described in the webpack/webpack-cli#737 `console.log` corrupts the final json file provided by the `--json` option.
They fixed this by switching to `console.error` as seen in this pull request: webpack/webpack-cli#744

I believe the same thing should be done here, since I'm having this line in my json file:

```
webpack-fix-style-only-entries: removing js from style only module: javascripts/appStyles-78c8323b9a1489caa5b8.js
```
@fqborges
Copy link
Owner

fqborges commented Feb 6, 2019

Thanks for that.

Printing to console.err seems wrong at first, but I found in https://webpack.js.org/api/plugins/#reporting-progress that it "prints progress messages to stderr by default", so I am accepting this PR.

I will open an issue to use ProgressPlugin instead of just printing the output to console.

@fqborges fqborges closed this Feb 6, 2019
@fqborges fqborges reopened this Feb 6, 2019
@fqborges fqborges merged commit 43836a7 into fqborges:master Feb 6, 2019
@CyberAP CyberAP deleted the patch-1 branch February 6, 2019 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants