Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): don't rename blocks which have a …
Browse files Browse the repository at this point in the history
…name

When using the unsupported `webpackChunkName` magic comment we renamed the chunk which in some cases causes a runtime error.

Closes #22525

(cherry picked from commit de14293)
  • Loading branch information
alan-agius4 authored and clydin committed Feb 22, 2022
1 parent 7a49397 commit acf1e5e
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -41,6 +41,11 @@ export class NamedChunksPlugin {
continue;
}

if (block.groupOptions.name) {
// Ignore groups which have been named already.
return undefined;
}

for (const dependency of block.dependencies) {
if (dependency instanceof ImportDependency) {
return Template.toPath(dependency.request);
Expand Down

0 comments on commit acf1e5e

Please sign in to comment.