@@ -621,9 +621,13 @@ async function writeRequiredServerFilesManifest(
621621 requiredServerFiles : RequiredServerFilesManifest
622622) {
623623 await writeManifest (
624- path . join ( distDir , SERVER_FILES_MANIFEST ) ,
624+ path . join ( distDir , SERVER_FILES_MANIFEST + '.json' ) ,
625625 requiredServerFiles
626626 )
627+ await writeFileUtf8 (
628+ path . join ( distDir , SERVER_FILES_MANIFEST + '.js' ) ,
629+ `self.__SERVER_FILES_MANIFEST=${ formatManifest ( requiredServerFiles ) } `
630+ )
627631}
628632
629633async function writeImagesManifest (
@@ -693,7 +697,10 @@ async function writeStandaloneDirectory(
693697
694698 for ( const file of [
695699 ...requiredServerFiles . files ,
696- path . join ( requiredServerFiles . config . distDir , SERVER_FILES_MANIFEST ) ,
700+ path . join (
701+ requiredServerFiles . config . distDir ,
702+ SERVER_FILES_MANIFEST + '.json'
703+ ) ,
697704 ...loadedEnvFiles . reduce < string [ ] > ( ( acc , envFile ) => {
698705 if ( [ '.env' , '.env.production' ] . includes ( envFile . path ) ) {
699706 acc . push ( envFile . path )
@@ -1915,7 +1922,8 @@ export default async function build(
19151922 BUILD_ID_FILE ,
19161923 path . join ( SERVER_DIRECTORY , NEXT_FONT_MANIFEST + '.js' ) ,
19171924 path . join ( SERVER_DIRECTORY , NEXT_FONT_MANIFEST + '.json' ) ,
1918- SERVER_FILES_MANIFEST ,
1925+ SERVER_FILES_MANIFEST + '.js' ,
1926+ SERVER_FILES_MANIFEST + '.json' ,
19191927 ]
19201928 . filter ( nonNullable )
19211929 . map ( ( file ) => path . join ( config . distDir , file ) ) ,
0 commit comments