Skip to content

Commit 7ce6523

Browse files
clydinhansl
authored andcommitted
feat(@ngtools/webpack): add additional lazy module plugin option
1 parent 3a4129e commit 7ce6523

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/@ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ export interface AngularCompilerPluginOptions {
7373
missingTranslation?: string;
7474
platform?: PLATFORM;
7575

76+
// added to the list of lazy routes
77+
additionalLazyModules?: { [module: string]: string };
78+
7679
// Use tsconfig to include path globs.
7780
compilerOptions?: ts.CompilerOptions;
7881
}
@@ -760,6 +763,9 @@ export class AngularCompilerPlugin implements Tapable {
760763
} else if (changedTsFiles.length > 0) {
761764
this._processLazyRoutes(this._findLazyRoutesInAst(changedTsFiles));
762765
}
766+
if (this._options.additionalLazyModules) {
767+
this._processLazyRoutes(this._options.additionalLazyModules);
768+
}
763769
}
764770
})
765771
.then(() => {

0 commit comments

Comments
 (0)