awesome-typescript-loader icon indicating copy to clipboard operation
awesome-typescript-loader copied to clipboard

Add verbose logging flag

Open lucaspiller opened this issue 8 years ago • 1 comments

This adds a new configuration flag verbose which defaults to false. It restricts certain 'verbose' logging of this loader behind this flag.

The rationale behind this change is that this verbose logging can break certain Webpack commands and flows. For example, Webpack has --json flag which is supposed to just print the output as JSON, but when this loader is added it outputs the following:

$ webpack --json

[at-loader] Using [email protected] from typescript and "tsconfig.json" from /app/tsconfig.json.


[at-loader] Checking started in a separate process...

[at-loader] Ok, 0.341 sec.
{
  "errors": [],
  "warnings": [],
...

With this change these verbose messages are no longer output, but errors are still output as usual.

lucaspiller avatar Oct 23 '17 19:10 lucaspiller

Thanks for this pull request, I was looking for an option to reduce verbose log messages.

@s-panferov Would you (re)consider merging this?

eliot-akira avatar Mar 25 '19 14:03 eliot-akira