Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): handle undefined entrypoints when…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
Simon Primetzhofer authored and clydin committed Aug 13, 2021
1 parent f4874d5 commit 9eb599d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function markAsyncChunksNonInitial(
// depended upon in Webpack, thus any extra entry point with `inject: false`,
// **cannot** be loaded in main bundle.
const asyncChunkIds = extraEntryPoints
.filter((entryPoint) => !entryPoint.inject)
.filter((entryPoint) => !entryPoint.inject && entryPoints[entryPoint.bundleName])
.flatMap((entryPoint) =>
entryPoints[entryPoint.bundleName].chunks?.filter((n) => n !== 'runtime'),
);
Expand Down

0 comments on commit 9eb599d

Please sign in to comment.