File tree Expand file tree Collapse file tree 4 files changed +10
-15
lines changed
packages/angular_devkit/build_angular
angular-cli-files/models/webpack-configs Expand file tree Collapse file tree 4 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ function _createAotPlugin(
6868 i18nInFormat : buildOptions . i18nFormat ,
6969 } ;
7070
71+ const compilerOptions = options . compilerOptions || { } ;
72+ if ( i18nExtract ) {
73+ // Extraction of i18n is still using the legacy VE pipeline
74+ compilerOptions . enableIvy = false ;
75+ }
76+
7177 const additionalLazyModules : { [ module : string ] : string } = { } ;
7278 if ( buildOptions . lazyModules ) {
7379 for ( const lazyModule of buildOptions . lazyModules ) {
@@ -92,6 +98,7 @@ function _createAotPlugin(
9298 logger : wco . logger ,
9399 directTemplateLoading : true ,
94100 ...options ,
101+ compilerOptions,
95102 } ;
96103
97104 pluginOptions = _pluginOptionsOverrides ( buildOptions , pluginOptions ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ import {
2020 getStatsConfig ,
2121 getStylesConfig ,
2222} from '../angular-cli-files/models/webpack-configs' ;
23- import { readTsconfig } from '../angular-cli-files/utilities/read-tsconfig' ;
2423import { statsErrorsToString , statsWarningsToString } from '../angular-cli-files/utilities/stats' ;
2524import { Schema as BrowserBuilderOptions } from '../browser/schema' ;
2625import { assertCompatibleAngularVersion } from '../utils/version' ;
@@ -59,15 +58,6 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte
5958 await context . getBuilderNameForTarget ( browserTarget ) ,
6059 ) ;
6160
62- // FIXME: i18n is not yet implemented in Ivy
63- // We should display a warning and exit gracefully.
64- const { options : compilerOptions } = readTsconfig ( browserOptions . tsConfig , context . workspaceRoot ) ;
65- if ( compilerOptions . enableIvy ) {
66- context . logger . warn ( 'We are sorry but i18n is not yet implemented in Ivy.' ) ;
67-
68- return { success : true } ;
69- }
70-
7161 // We need to determine the outFile name so that AngularCompiler can retrieve it.
7262 let outFile = options . outFile || getI18nOutfile ( options . i18nFormat ) ;
7363 if ( options . outputPath ) {
Original file line number Diff line number Diff line change 88import { Architect } from '@angular-devkit/architect' ;
99import { TestLogger } from '@angular-devkit/architect/testing' ;
1010import { join , normalize , virtualFs } from '@angular-devkit/core' ;
11- import { createArchitect , extractI18nTargetSpec , host , veEnabled } from '../utils' ;
11+ import { createArchitect , extractI18nTargetSpec , host } from '../utils' ;
1212
1313
14- // DISABLED_FOR_IVY These should pass but are currently not supported
15- ( veEnabled ? describe : xdescribe ) ( 'Extract i18n Target' , ( ) => {
14+ describe ( 'Extract i18n Target' , ( ) => {
1615 const extractionFile = join ( normalize ( 'src' ) , 'messages.xlf' ) ;
1716 let architect : Architect ;
1817
Original file line number Diff line number Diff line change @@ -100,8 +100,7 @@ if (!argv.ve) {
100100 // As we transition into using Ivy as the default this list should be reassessed.
101101 allTests = allTests
102102 // Ivy doesn't support i18n externally at the moment.
103- . filter ( name => ! name . includes ( 'tests/i18n/' ) )
104- . filter ( name => ! name . endsWith ( 'tests/build/aot/aot-i18n.ts' ) )
103+ . filter ( name => ! name . endsWith ( 'tests/build/aot/aot-i18n.ts' ) ) ;
105104}
106105
107106const shardId = 'shard' in argv ? argv [ 'shard' ] : null ;
You can’t perform that action at this time.
0 commit comments