summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@skypack.dev> 2022-02-17 10:35:01 -0500
committerGravatar GitHub <noreply@github.com> 2022-02-17 10:35:01 -0500
commit96609d4c9ef66ef6852e590fa439a2177e9ae847 (patch)
treec78e5c562e5087b20e59908905d484afc49441a2
parent87762410f3c2b887e049422d61a17e9c0fdabd88 (diff)
downloadastro-96609d4c9ef66ef6852e590fa439a2177e9ae847.tar.gz
astro-96609d4c9ef66ef6852e590fa439a2177e9ae847.tar.zst
astro-96609d4c9ef66ef6852e590fa439a2177e9ae847.zip
Static build - fixes path to HMR script (#2606)
* Static build - fixes path to HMR script * Changeset
-rw-r--r--.changeset/cool-months-deliver.md5
-rw-r--r--packages/astro/src/core/render/dev/index.ts2
2 files changed, 6 insertions, 1 deletions
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: '',
});
}