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

Info string on stdout causes problem to --json webpack output #95

Closed
alexdrel opened this issue Nov 3, 2015 · 8 comments
Closed

Info string on stdout causes problem to --json webpack output #95

alexdrel opened this issue Nov 3, 2015 · 8 comments

Comments

@alexdrel
Copy link

alexdrel commented Nov 3, 2015

Hi,
The ts-loader writes info string to stdout:

ts-loader: Using [email protected] and /[skipped]/src/tsconfig.json

When building JSON module statistics it goes to the json file and has to be removed manually.

webpack --progress -j > m.json

Of course it is a minor nuisance but it would be nice if it will be written to stderr instead of stdout.

Thanks

@jbrantly
Copy link
Member

jbrantly commented Nov 3, 2015

If you use the silent flag that info won't be written. I'm not sure using stderr would be correct since it's not an error.

@blakeembrey
Copy link
Member

@jbrantly It's not uncommon to use stderr. I just realised today that NPM logs to output to stderr and not stdout.

Reference: https://github.com/npm/npmlog

@jbrantly
Copy link
Member

jbrantly commented Nov 6, 2015

@blakeembrey Interesting. Maybe something to look at then.

@alexdrel For the time being does the silent flag solve your need?

@alexdrel
Copy link
Author

alexdrel commented Nov 6, 2015

silent flag works fine but it is actually simpler to remove the first line from json than to change webpack.config.js back and forth.
It is not a big deal, but I consider stderr as suitable for anything which is not primary output - the progress flag for example writes to stderr.

@jbrantly
Copy link
Member

jbrantly commented Nov 6, 2015

Why do you have to change the webpack config back and forth? Just leave the silent flag on. All it affects is that one message which you probably don't care much about once things are "set up".

Re: stderr, I'm open to that.

@alexdrel
Copy link
Author

alexdrel commented Nov 6, 2015

@jbrantly - I kinda like it :) - it shows ts version and I use to jump between nightly,1.6.2 and 1.7.2 (which I don't quite understand - is it official and how it made its way into sublime plugin).

@jbrantly
Copy link
Member

jbrantly commented Nov 6, 2015

I kinda like it :)

That's... actually a really good reason 😁

@jbrantly
Copy link
Member

Fixed in v0.7.0. Thanks for reporting!

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

3 participants