@@ -108,6 +108,7 @@ export class AngularCompilerPlugin implements Tapable {
108
108
private _donePromise : Promise < void > | null ;
109
109
private _compiler : any = null ;
110
110
private _compilation : any = null ;
111
+ private _normalizedLocale : string ;
111
112
112
113
// TypeChecker process.
113
114
private _forkTypeChecker = true ;
@@ -225,7 +226,8 @@ export class AngularCompilerPlugin implements Tapable {
225
226
this . _compilerOptions . i18nOutFormat = options . i18nOutFormat ;
226
227
}
227
228
if ( options . locale !== undefined ) {
228
- this . _compilerOptions . i18nInLocale = this . _validateLocale ( options . locale ) ;
229
+ this . _compilerOptions . i18nInLocale = options . locale ;
230
+ this . _normalizedLocale = this . _validateLocale ( options . locale ) ;
229
231
}
230
232
if ( options . missingTranslation !== undefined ) {
231
233
this . _compilerOptions . i18nInMissingTranslations =
@@ -652,9 +654,9 @@ export class AngularCompilerPlugin implements Tapable {
652
654
// If we have a locale, auto import the locale data file.
653
655
// This transform must go before replaceBootstrap because it looks for the entry module
654
656
// import, which will be replaced.
655
- if ( this . _compilerOptions . i18nInLocale ) {
657
+ if ( this . _normalizedLocale ) {
656
658
this . _transformers . push ( registerLocaleData ( isAppPath , getEntryModule ,
657
- this . _compilerOptions . i18nInLocale ) ) ;
659
+ this . _normalizedLocale ) ) ;
658
660
}
659
661
660
662
if ( ! this . _JitMode ) {
0 commit comments