@@ -108,6 +108,7 @@ export class AngularCompilerPlugin implements Tapable {
108108 private _donePromise : Promise < void > | null ;
109109 private _compiler : any = null ;
110110 private _compilation : any = null ;
111+ private _normalizedLocale : string ;
111112
112113 // TypeChecker process.
113114 private _forkTypeChecker = true ;
@@ -225,7 +226,8 @@ export class AngularCompilerPlugin implements Tapable {
225226 this . _compilerOptions . i18nOutFormat = options . i18nOutFormat ;
226227 }
227228 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 ) ;
229231 }
230232 if ( options . missingTranslation !== undefined ) {
231233 this . _compilerOptions . i18nInMissingTranslations =
@@ -652,9 +654,9 @@ export class AngularCompilerPlugin implements Tapable {
652654 // If we have a locale, auto import the locale data file.
653655 // This transform must go before replaceBootstrap because it looks for the entry module
654656 // import, which will be replaced.
655- if ( this . _compilerOptions . i18nInLocale ) {
657+ if ( this . _normalizedLocale ) {
656658 this . _transformers . push ( registerLocaleData ( isAppPath , getEntryModule ,
657- this . _compilerOptions . i18nInLocale ) ) ;
659+ this . _normalizedLocale ) ) ;
658660 }
659661
660662 if ( ! this . _JitMode ) {
0 commit comments