@@ -64,6 +64,11 @@ export async function inlineI18n(
64
64
// For each active locale, use the inliner to process the output files of the build.
65
65
const updatedOutputFiles = [ ] ;
66
66
const updatedAssetFiles = [ ] ;
67
+ // Root and SSR entry files are not modified.
68
+ const unModifiedOutputFiles = executionResult . outputFiles . filter (
69
+ ( { type } ) => type === BuildOutputFileType . Root || type === BuildOutputFileType . ServerRoot ,
70
+ ) ;
71
+
67
72
try {
68
73
for ( const locale of i18nOptions . inlineLocales ) {
69
74
// A locale specific set of files is returned from the inliner.
@@ -87,7 +92,7 @@ export async function inlineI18n(
87
92
...options ,
88
93
baseHref : getLocaleBaseHref ( baseHref , i18nOptions , locale ) ?? baseHref ,
89
94
} ,
90
- localeOutputFiles ,
95
+ [ ... unModifiedOutputFiles , ... localeOutputFiles ] ,
91
96
executionResult . assetFiles ,
92
97
initialFiles ,
93
98
locale ,
@@ -124,9 +129,7 @@ export async function inlineI18n(
124
129
// Update the result with all localized files.
125
130
executionResult . outputFiles = [
126
131
// Root and SSR entry files are not modified.
127
- ...executionResult . outputFiles . filter (
128
- ( { type } ) => type === BuildOutputFileType . Root || type === BuildOutputFileType . ServerRoot ,
129
- ) ,
132
+ ...unModifiedOutputFiles ,
130
133
// Updated files for each locale.
131
134
...updatedOutputFiles ,
132
135
] ;
0 commit comments