Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 68a3b1e

Browse files
alan-agius4filipesilva
authored andcommittedJun 29, 2020
fix(@angular-devkit/build-angular): don't dedupe linked modules
Closes #18021
1 parent 95c08e7 commit 68a3b1e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎packages/angular_devkit/build_angular/src/angular-cli-files/plugins/dedupe-module-resolve-plugin.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ interface NormalModuleFactoryRequest {
1919
};
2020
descriptionFileRoot: string;
2121
descriptionFilePath: string;
22+
directory?: boolean;
23+
file?: boolean;
2224
}
2325

2426
export interface DedupeModuleResolvePluginOptions {
@@ -45,7 +47,13 @@ export class DedupeModuleResolvePlugin {
4547
return;
4648
}
4749

48-
// Only try to dedupe modules which have a name and a version
50+
// When either of these properties is undefined. It typically means it's a link.
51+
// In which case we shouldn't try to dedupe it.
52+
if (request.file === undefined || request.directory === undefined) {
53+
return;
54+
}
55+
56+
// Empty name or versions are no valid primary entrypoints of a library
4957
if (!request.descriptionFileData.name || !request.descriptionFileData.version) {
5058
return;
5159
}

0 commit comments

Comments
 (0)
Please sign in to comment.