Skip to content

Commit e6a9f78

Browse files
clydindgp1130
authored andcommitted
fix(@ngtools/webpack): always use VE for deprecated string route discovery
When in JIT mode during lazy route discovery, the Ivy compiler willl attempt to parse templates which may fail when this plugin is used with webpack loaders that support custom template formats. The string lazy routes must be discovered before the webpack build starts but the template loading/processing does not occur until the webpack build commences. Fixes: #17002 (cherry picked from commit e7dbb31)
1 parent 7f6703c commit e6a9f78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ export class AngularCompilerPlugin {
470470
time('AngularCompilerPlugin._listLazyRoutesFromProgram.createProgram');
471471
ngProgram = createProgram({
472472
rootNames: this._rootNames,
473-
options: { ...this._compilerOptions, genDir: '', collectAllErrors: true },
473+
options: { ...this._compilerOptions, genDir: '', collectAllErrors: true, enableIvy: false },
474474
host: this._compilerHost,
475475
});
476476
timeEnd('AngularCompilerPlugin._listLazyRoutesFromProgram.createProgram');

0 commit comments

Comments
 (0)