Skip to content

Commit 297410a

Browse files
Simon Primetzhoferclydin
Simon Primetzhofer
authored andcommittedAug 13, 2021
fix(@angular-devkit/build-angular): handle undefined entrypoints when marking async chunks
When using custom builders, it is possible to remove entries from the webpack-configuration manually. This may eventually lead to undefined entryPoints in async-chunks.ts and aborts the compilation. (cherry picked from commit 9eb599d)
1 parent 2983371 commit 297410a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/angular_devkit/build_angular/src/webpack/utils/async-chunks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function markAsyncChunksNonInitial(
2626
// depended upon in Webpack, thus any extra entry point with `inject: false`,
2727
// **cannot** be loaded in main bundle.
2828
const asyncChunkIds = extraEntryPoints
29-
.filter((entryPoint) => !entryPoint.inject)
29+
.filter((entryPoint) => !entryPoint.inject && entryPoints[entryPoint.bundleName])
3030
.flatMap((entryPoint) =>
3131
entryPoints[entryPoint.bundleName].chunks?.filter((n) => n !== 'runtime'),
3232
);

0 commit comments

Comments
 (0)
Please sign in to comment.