diff --git a/.changeset/cool-months-deliver.md b/.changeset/cool-months-deliver.md new file mode 100644 index 0000000000..48c265c0af --- /dev/null +++ b/.changeset/cool-months-deliver.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes 404 to HMR script in the static build diff --git a/packages/astro/src/core/render/dev/index.ts b/packages/astro/src/core/render/dev/index.ts index f60aca7188..1fe4a52470 100644 --- a/packages/astro/src/core/render/dev/index.ts +++ b/packages/astro/src/core/render/dev/index.ts @@ -59,7 +59,7 @@ export async function render(renderers: Renderer[], mod: ComponentInstance, ssrO children: '', }); scripts.add({ - props: { type: 'module', src: new URL('../../runtime/client/hmr.js', import.meta.url).pathname }, + props: { type: 'module', src: new URL('../../../runtime/client/hmr.js', import.meta.url).pathname }, children: '', }); }