From b192ef287e14940733b17aea01ef2ecb72562f4b Mon Sep 17 00:00:00 2001 From: cexbrayat Date: Fri, 25 Jan 2019 19:10:21 +0100 Subject: [PATCH] fix(@schematics/angular): enable lazy loading with ivy Angular `8.0.0-beta.1` supports lazy loading with Ivy (at least a partial support), but currently the CLI needs `"allowEmptyCodegenFiles": true` to avoid errors like: ``` ERROR in ./src/$$_lazy_route_resource lazy namespace object Module not found: Error: Can't resolve '/src/app/races/races.module.ngfactory.js' in '/src/$$_lazy_route_resource' ``` --- .../angular/application/files/root/tsconfig.app.json.template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/schematics/angular/application/files/root/tsconfig.app.json.template b/packages/schematics/angular/application/files/root/tsconfig.app.json.template index 9a22c6e6ad17..ffbaffb9076e 100644 --- a/packages/schematics/angular/application/files/root/tsconfig.app.json.template +++ b/packages/schematics/angular/application/files/root/tsconfig.app.json.template @@ -9,6 +9,7 @@ "**/*.spec.ts" ]<% if (experimentalIvy) { %>, "angularCompilerOptions": { - "enableIvy": "ngtsc" + "enableIvy": "ngtsc", + "allowEmptyCodegenFiles": true }<% } %> }