Skip to content

Commit

Permalink
fix(@ngtools/webpack): always use VE for deprecated string route disc…
Browse files Browse the repository at this point in the history
…overy

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
  • Loading branch information
clydin authored and dgp1130 committed Feb 26, 2020
1 parent fefd2f6 commit e7dbb31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ export class AngularCompilerPlugin {
time('AngularCompilerPlugin._listLazyRoutesFromProgram.createProgram');
ngProgram = createProgram({
rootNames: this._rootNames,
options: { ...this._compilerOptions, genDir: '', collectAllErrors: true },
options: { ...this._compilerOptions, genDir: '', collectAllErrors: true, enableIvy: false },
host: this._compilerHost,
});
timeEnd('AngularCompilerPlugin._listLazyRoutesFromProgram.createProgram');
Expand Down

0 comments on commit e7dbb31

Please sign in to comment.