mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
feat(@angular-devkit/build-angular): remove experimentalImportFactories option
It will just be always be used when applicable. Fix #14218
This commit is contained in:
parent
5b5fffbb5b
commit
0f9de92dcb
@ -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,
|
||||
|
@ -60,7 +60,6 @@ export interface BuildOptions {
|
||||
forkTypeChecker: boolean;
|
||||
profile?: boolean;
|
||||
es5BrowserSupport?: boolean;
|
||||
experimentalImportFactories?: boolean;
|
||||
|
||||
main: string;
|
||||
index: string;
|
||||
|
@ -91,7 +91,6 @@ function _createAotPlugin(
|
||||
contextElementDependencyConstructor: require('webpack/lib/dependencies/ContextElementDependency'),
|
||||
logger: wco.logger,
|
||||
directTemplateLoading: true,
|
||||
importFactories: buildOptions.experimentalImportFactories,
|
||||
...options,
|
||||
};
|
||||
|
||||
|
@ -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."
|
||||
|
@ -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)`);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user