Skip to content

Commit

Permalink
fix(webpack): use typeRoots to avoid TS typing issue when cssnano and…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
3cp committed May 1, 2019
1 parent 36d384e commit d85ca5c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skeleton/common/tsconfig.json__if_typescript
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d85ca5c

Please sign in to comment.