Make tsconfig.json selection during webpack deterministic.

Without this `configFile` option, ts-loader apparently does not
guarantee a deterministic choice of which of the three `tsconfig.json`
files below `extensions/ql-vscode` actually gets used during webpack.
This leads to very strange behavior as even removing dead code can
change which `tsconfig.json` 'wins the race'. I observed that removing
a dependence on `semmle-bqrs` from `src/view` *tended* to make
`ts-loader` choose `src/compare/view/tsconfig.json` instead.
This commit is contained in:
Jason Reed
2020-07-13 12:39:37 -04:00
parent 4c30374dc3
commit 3694fdaecb
2 changed files with 3 additions and 24 deletions

View File

@@ -20,6 +20,9 @@ export const config: webpack.Configuration = {
{
test: /\.(ts|tsx)$/,
loader: 'ts-loader',
options: {
configFile: 'view/tsconfig.json',
}
},
{
test: /\.less$/,

View File

@@ -1,24 +0,0 @@
{
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"target": "es6",
"outDir": "out",
"lib": [
"es6",
"dom"
],
"jsx": "react",
"sourceMap": true,
"rootDir": "../..",
"strict": true,
"noUnusedLocals": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"experimentalDecorators": true,
"typeRoots" : ["./typings"]
},
"exclude": [
"node_modules"
]
}