feat(@angular-devkit/build-angular): remove experimentalImportFactories option

It will just be always be used when applicable.

Fix #14218
This commit is contained in:
Filipe Silva 2019-04-22 17:04:54 +01:00 committed by Alex Eagle
parent 5b5fffbb5b
commit 0f9de92dcb
5 changed files with 0 additions and 19 deletions

View File

@ -886,11 +886,6 @@
"webWorkerTsConfig": {
"type": "string",
"description": "TypeScript configuration for Web Worker modules."
},
"experimentalImportFactories": {
"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.",
"type": "boolean",
"default": false
}
},
"additionalProperties": false,

View File

@ -60,7 +60,6 @@ export interface BuildOptions {
forkTypeChecker: boolean;
profile?: boolean;
es5BrowserSupport?: boolean;
experimentalImportFactories?: boolean;
main: string;
index: string;

View File

@ -91,7 +91,6 @@ function _createAotPlugin(
contextElementDependencyConstructor: require('webpack/lib/dependencies/ContextElementDependency'),
logger: wco.logger,
directTemplateLoading: true,
importFactories: buildOptions.experimentalImportFactories,
...options,
};

View File

@ -316,11 +316,6 @@
"default": false,
"x-deprecated": true
},
"experimentalImportFactories": {
"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.",
"type": "boolean",
"default": false
},
"webWorkerTsConfig": {
"type": "string",
"description": "TypeScript configuration for Web Worker modules."

View File

@ -89,13 +89,6 @@ export default async function () {
await ng('e2e', '--prod');
// Test `import()` style lazy load.
if (!ivyProject) {
await updateJsonFile('angular.json', json => {
// Add the experimental flag to import factories in View Engine.
const buildTarget = json['projects'][projectName]['architect']['build'];
buildTarget['options']['experimentalImportFactories'] = true;
});
}
// Both Ivy and View Engine should support it.
await replaceLoadChildren(`() => import('./lazy/lazy.module').then(m => m.LazyModule)`);