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.

(cherry picked from commit 9eb599d)
  • Loading branch information
Simon Primetzhofer authored and clydin committed Aug 13, 2021
1 parent 2983371 commit 297410a
Showing 1 changed file with 1 addition and 1 deletion.
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 297410a

Please sign in to comment.