Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): don't dedupe modules without a na…
Browse files Browse the repository at this point in the history
…me or version

We should not try to dedupe secondary entrypoints, or modules which don't have a name and a version.

Closes #17967
  • Loading branch information
alan-agius4 authored and filipesilva committed Jun 29, 2020
1 parent 52b02c6 commit 95c08e7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ interface NormalModuleFactoryRequest {
relativePath: string;
path: string;
descriptionFileData: {
name: string;
version: string;
name?: string;
version?: string;
};
descriptionFileRoot: string;
descriptionFilePath: string;
Expand Down Expand Up @@ -45,6 +45,11 @@ export class DedupeModuleResolvePlugin {
return;
}

// Only try to dedupe modules which have a name and a version
if (!request.descriptionFileData.name || !request.descriptionFileData.version) {
return;
}

const moduleId = request.descriptionFileData.name + '@' + request.descriptionFileData.version;
const prevResolvedModule = this.modules.get(moduleId);

Expand Down

0 comments on commit 95c08e7

Please sign in to comment.