robertknight / webpack-bundle-size-analyzer

A tool for finding out what contributes to the size of Webpack bundles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TS-Loader is messing up the piped JSON

jrgleason opened this issue · comments

I have ts-loader configured and it automatically logs the following line...

ts-loader: Using typescript@2.2.1 and /.../tsconfig.json

So when I run

webpack --json | webpack-bundle-size-analyzer

I get

Error: The input is not valid JSON
....
 - There is no extra non-JSON content in the output, such as log messages.

As far as I can tell there is no way to turn off this extra logging, so I think there is also a TS-Loader issue as well. In the mean time I am piping the JSON to a file and removing the extra line then running like webpack-bundle-size-analyzer <piped file>

NM It is an exclusively ts-loader issue TypeStrong/ts-loader#488