Skip to content

Commit 430c003

Browse files
committed
feat(@angular-devkit/build-angular): add experimentalImportFactories option
1 parent 9b19009 commit 430c003

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/models/build-options.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export interface BuildOptions {
5959
forkTypeChecker: boolean;
6060
profile?: boolean;
6161
es5BrowserSupport?: boolean;
62+
experimentalImportFactories?: boolean;
6263

6364
main: string;
6465
index: string;

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ function _createAotPlugin(
7575
contextElementDependencyConstructor: require('webpack/lib/dependencies/ContextElementDependency'),
7676
logger: wco.logger,
7777
directTemplateLoading: true,
78+
importFactories: buildOptions.experimentalImportFactories,
7879
...options,
7980
};
8081
return new AngularCompilerPlugin(pluginOptions);

packages/angular_devkit/build_angular/src/browser/schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@
315315
"type": "boolean",
316316
"default": false,
317317
"x-deprecated": true
318+
},
319+
"experimentalImportFactories": {
320+
"description": "**EXPERIMENTAL** Transform import statements for lazy routes to import factories when using View Engine. Should only be used when switching back and forth between View Engine and Ivy. See https://angular.io/guide/ivy for usage information.",
321+
"type": "boolean",
322+
"default": false
318323
}
319324
},
320325
"additionalProperties": false,

0 commit comments

Comments
 (0)