Skip to content

Commit 36bfb39

Browse files
authored
Fix dependabot warnings (#816)
This commit updates to webpack 5 in order to fix some dependabot errors. Because webpack 5 introduces some breaking changes, this commit also makes some minor changes to the build code.
1 parent 6d26491 commit 36bfb39

File tree

4 files changed

+1551
-3416
lines changed

4 files changed

+1551
-3416
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ export const config: webpack.Configuration = {
1313
},
1414
devtool: 'inline-source-map',
1515
resolve: {
16-
extensions: ['.js', '.ts', '.tsx', '.json']
16+
extensions: ['.js', '.ts', '.tsx', '.json'],
17+
fallback: {
18+
path: false
19+
}
1720
},
1821
module: {
1922
rules: [

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

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ export function compileView(cb: (err?: Error) => void) {
66
if (error) {
77
cb(error);
88
}
9-
console.log(stats.toString({
10-
errorDetails: true,
11-
colors: true,
12-
assets: false,
13-
builtAt: false,
14-
version: false,
15-
hash: false,
16-
entrypoints: false,
17-
timings: false,
18-
modules: false,
19-
errors: true
20-
}));
21-
if (stats.hasErrors()) {
22-
cb(new Error('Compilation errors detected.'));
23-
return;
9+
if (stats) {
10+
console.log(stats.toString({
11+
errorDetails: true,
12+
colors: true,
13+
assets: false,
14+
builtAt: false,
15+
version: false,
16+
hash: false,
17+
entrypoints: false,
18+
timings: false,
19+
modules: false,
20+
errors: true
21+
}));
22+
if (stats.hasErrors()) {
23+
cb(new Error('Compilation errors detected.'));
24+
return;
25+
}
2426
}
2527

2628
cb();

0 commit comments

Comments
 (0)