TypeScript Version: 2.1.0-dev.20160803
Trying to migrate medium size js project to ts so I am using allowJs: true in tsconfig.json and have mix of ts (10%) and js (90%) files already
Unfortunately compilation time with allowJs:true is 23 seconds while with allowJs:false is 3 seconds.
Problem seems to be that all js files follow the node_modules ("moduleResolution": "node" in tsconfig.json)
Is there any way to have moduleResolution:classic for JS part while node for TS or some other way to configure the project so that js files are not so deeply analyzed.
Here are the stats:
with allowJs:true
time tsc -p . --traceResolution | wc -l
154171
tsc -p . --traceResolution 23.37s
time tsc -p . --traceResolution | grep node_modules | wc -l
148740
tsc -p . --traceResolution 23.41s
with allowJs:false
time tsc -p . --traceResolution | wc -l
1498
tsc -p . --traceResolution 3.03s
time tsc -p . --traceResolution | grep node_modules | wc -l
1392
tsc -p . --traceResolution 3.02s
TypeScript Version: 2.1.0-dev.20160803
Trying to migrate medium size
jsproject totsso I am usingallowJs: truein tsconfig.json and have mix ofts(10%) andjs(90%) files alreadyUnfortunately compilation time with
allowJs:trueis 23 seconds while withallowJs:falseis 3 seconds.Problem seems to be that all js files follow the
node_modules("moduleResolution": "node"in tsconfig.json)Is there any way to have
moduleResolution:classicforJSpart whilenodeforTSor some other way to configure the project so thatjsfiles are not so deeply analyzed.Here are the stats:
with
allowJs:truewith
allowJs:false