Skip to content

Don't print info when running webpack --json #101

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

Closed
geirsagberg opened this issue Feb 26, 2018 · 5 comments
Closed

Don't print info when running webpack --json #101

geirsagberg opened this issue Feb 26, 2018 · 5 comments
Labels

Comments

@geirsagberg
Copy link

Version: 0.3.0

Running webpack --profile --json currently produces the following when fork-ts-checker-webpack-plugin is included:

Starting type checking service...
Using �[1m1 worker�[22m with �[1m2048MB�[22m memory limit
{
  "errors": [],
  "warnings": [],
  "version": "3.10.0",
  "hash": "8c0541347f7cefe0876b",
...

The first two lines cause e.g. webpack-bundle-analyzer to fail.

When webpack is ran with --json, nothing should be written to console.

@johnnyreilly
Copy link
Member

We had this same issue in ts-loader for ages. In the end we bowed to peer pressure and dialed down our logging to not emit by default. Before that we had a --silent option which nixed it - people could use that and did. Maybe worth introducing a similar option?

@meyer
Copy link

meyer commented Apr 24, 2018

yep, same issue here. Are you all accepting PRs?

@meyer
Copy link

meyer commented Apr 24, 2018

I just found the silent option. Looks like it does what I want.

@Akuukis
Copy link

Akuukis commented Sep 13, 2018

Got the same problem, this works for me:

new ForkTsCheckerWebpackPlugin({tsconfig: 'tsconfig.json', silent: process.argv.includes('--json')}),

@piotr-oles
Copy link
Collaborator

@geirsagberg , @meyer , @Akuukis
Please try fork-ts-checker-webpack-plugin@alpha - I've published a new version which should resolve this issue 🚀
I will close this issue to clean-up the backlog :)

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

No branches or pull requests

5 participants