Skip to content

Commit 3694fda

Browse files
committed
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.
1 parent 4c30374 commit 3694fda

2 files changed

Lines changed: 3 additions & 24 deletions

File tree

extensions/ql-vscode/gulpfile.js/webpack.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export const config: webpack.Configuration = {
2020
{
2121
test: /\.(ts|tsx)$/,
2222
loader: 'ts-loader',
23+
options: {
24+
configFile: 'view/tsconfig.json',
25+
}
2326
},
2427
{
2528
test: /\.less$/,

extensions/ql-vscode/src/compare/view/tsconfig.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)