From d85ca5c5e7f561b0bb428385594843977284a2dc Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Thu, 2 May 2019 08:23:23 +1000 Subject: [PATCH] fix(webpack): use typeRoots to avoid TS typing issue when cssnano and protractor are selected cssnano and protractor load different version of @types/q which confused TypeScript. It's likely only confusing ts-loader because only webpack app is affected, not cli-bundler app. Setting typeRoots is not flexible in lerna hoisting environment, that's why we did not turn it globally for webpack+TypeScript app. closes #1090 --- skeleton/common/tsconfig.json__if_typescript | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skeleton/common/tsconfig.json__if_typescript b/skeleton/common/tsconfig.json__if_typescript index 53dd8ef02..fadcfe313 100644 --- a/skeleton/common/tsconfig.json__if_typescript +++ b/skeleton/common/tsconfig.json__if_typescript @@ -32,6 +32,10 @@ "types": ["node", "jest"], // @endif + // @if feat.webpack && feat['postcss-typical'] && feat.protractor + "typeRoots": ["./node_modules/@types"], + // @endif + "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true,