Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): don't dedupe linked modules
Browse files Browse the repository at this point in the history
Closes #18021
  • Loading branch information
alan-agius4 authored and filipesilva committed Jun 29, 2020
1 parent 6547d15 commit 9efc3cd
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ interface NormalModuleFactoryRequest {
};
descriptionFileRoot: string;
descriptionFilePath: string;
directory?: boolean;
file?: boolean;
}

export interface DedupeModuleResolvePluginOptions {
Expand All @@ -45,7 +47,13 @@ export class DedupeModuleResolvePlugin {
return;
}

// Only try to dedupe modules which have a name and a version
// When either of these properties is undefined. It typically means it's a link.
// In which case we shouldn't try to dedupe it.
if (request.file === undefined || request.directory === undefined) {
return;
}

// Empty name or versions are no valid primary entrypoints of a library
if (!request.descriptionFileData.name || !request.descriptionFileData.version) {
return;
}
Expand Down

0 comments on commit 9efc3cd

Please sign in to comment.