8000 fix(@ngtools/webpack): `exportLazyModuleMap` should not be executed i… · leon/angular-cli@0cf8ce5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0cf8ce5

Browse files
alan-agius4vikerman
authored andcommitted
fix(@ngtools/webpack): exportLazyModuleMap should not be executed in Ivy
The export lazy module map is required only for string based lazy loading which is not supported in Ivy.
1 parent 3af79b9 commit 0cf8ce5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,12 @@ export class AngularCompilerPlugin {
10121012
));
10131013
}
10141014
} else if (this._platform === PLATFORM.Server) {
1015-
this._transformers.push(exportLazyModuleMap(isMainPath, getLazyRoutes));
1015+
// The export lazy module map is required only for string based lazy loading
1016+
// which is not supported in Ivy
1017+
if (!this._compilerOptions.enableIvy) {
1018+
this._transformers.push(exportLazyModuleMap(isMainPath, getLazyRoutes));
1019+
}
1020+
10161021
if (this._useFactories) {
10171022
this._transformers.push(
10181023
exportNgFactory(isMainPath, getEntryModule),

0 commit comments

Comments
 (0)
0