We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c322a29 commit d5348bdCopy full SHA for d5348bd
packages/angular_devkit/build_webpack/src/webpack/index.ts
@@ -54,10 +54,9 @@ export function runWebpack(
54
return createWebpack({ ...config, watch: false }).pipe(
55
switchMap(webpackCompiler => new Observable<BuildResult>(obs => {
56
// Webpack 5 has a compiler level close function
57
- // The close function will crash if caching is disabled
58
- const compilerClose = webpackCompiler.options.cache !== false
59
- ? (webpackCompiler as { close?(callback: () => void): void }).close
60
- : undefined;
+ const compilerClose = (webpackCompiler as { close?(callback: () => void): void }).close?.bind(
+ webpackCompiler,
+ );
61
62
const callback = (err?: Error, stats?: webpack.Stats) => {
63
if (err) {
0 commit comments