@@ -64,6 +64,11 @@ export async function inlineI18n(
6464 // For each active locale, use the inliner to process the output files of the build.
6565 const updatedOutputFiles = [ ] ;
6666 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+
6772 try {
6873 for ( const locale of i18nOptions . inlineLocales ) {
6974 // A locale specific set of files is returned from the inliner.
@@ -87,7 +92,7 @@ export async function inlineI18n(
8792 ...options ,
8893 baseHref : getLocaleBaseHref ( baseHref , i18nOptions , locale ) ?? baseHref ,
8994 } ,
90- localeOutputFiles ,
95+ [ ... unModifiedOutputFiles , ... localeOutputFiles ] ,
9196 executionResult . assetFiles ,
9297 initialFiles ,
9398 locale ,
@@ -124,9 +129,7 @@ export async function inlineI18n(
124129 // Update the result with all localized files.
125130 executionResult . outputFiles = [
126131 // Root and SSR entry files are not modified.
127- ...executionResult . outputFiles . filter (
128- ( { type } ) => type === BuildOutputFileType . Root || type === BuildOutputFileType . ServerRoot ,
129- ) ,
132+ ...unModifiedOutputFiles ,
130133 // Updated files for each locale.
131134 ...updatedOutputFiles ,
132135 ] ;
0 commit comments