From e587f9d902be882b973f21b5b66318bf5a155f05 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 24 Mar 2022 11:47:44 -0400 Subject: [PATCH] Await generatePages --- packages/astro/src/core/build/generate.ts | 2 +- packages/astro/src/core/build/static-build.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index dc7ce360872ba..57e62ccee9a0f 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 217bf6c062806..f18c1b176935a 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