diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index dc7ce360872b..57e62ccee9a0 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -92,7 +92,7 @@ export async function generatePages(result: RollupOutput, opts: StaticBuildOptio const ssrEntry = await import(ssrEntryURL.toString()); for(const pageData of eachPageData(internals)) { - generatePage(opts, internals, pageData, ssrEntry); + await generatePage(opts, internals, pageData, ssrEntry); } } diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 217bf6c06280..f18c1b176935 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -116,7 +116,9 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp output: { format: 'esm', entryFileNames: 'entry.mjs', + chunkFileNames: 'chunks/[name].[hash].mjs', assetFileNames: 'assets/[name].[hash][extname]', + inlineDynamicImports: true, }, }, // must match an esbuild target