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:
@@ -20,6 +20,9 @@ export const config: webpack.Configuration = {
|
||||
{
|
||||
test: /\.(ts|tsx)$/,
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
configFile: 'view/tsconfig.json',
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.less$/,
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user