Skip to content

Commit d85ca5c

Browse files
committed
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
1 parent 36d384e commit d85ca5c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

skeleton/common/tsconfig.json__if_typescript

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
"types": ["node", "jest"],
3333
// @endif
3434

35+
// @if feat.webpack && feat['postcss-typical'] && feat.protractor
36+
"typeRoots": ["./node_modules/@types"],
37+
// @endif
38+
3539
"removeComments": true,
3640
"emitDecoratorMetadata": true,
3741
"experimentalDecorators": true,

0 commit comments

Comments
 (0)