From 96609d4c9ef66ef6852e590fa439a2177e9ae847 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 17 Feb 2022 10:35:01 -0500 Subject: [PATCH] Static build - fixes path to HMR script (#2606) * Static build - fixes path to HMR script * Changeset --- .changeset/cool-months-deliver.md | 5 +++++ packages/astro/src/core/render/dev/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/cool-months-deliver.md diff --git a/.changeset/cool-months-deliver.md b/.changeset/cool-months-deliver.md new file mode 100644 index 000000000..48c265c0a --- /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 f60aca718..1fe4a5247 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: '', }); }