mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -05:00
Fixes external HMR (#1654)
This commit is contained in:
parent
07f786096d
commit
0430c0e1d2
1 changed files with 3 additions and 1 deletions
|
@ -67628,7 +67628,9 @@ function clientInjectionsPlugin(config) {
|
||||||
return {
|
return {
|
||||||
name: 'vite:client-inject',
|
name: 'vite:client-inject',
|
||||||
transform(code, id) {
|
transform(code, id) {
|
||||||
if (id === normalizedClientEntry || id === normalizedEnvEntry) {
|
if (id === normalizedClientEntry || id === normalizedEnvEntry ||
|
||||||
|
// Note that this is only needed for the Astro fork.
|
||||||
|
id.includes('astro_runtime_client_hmr')) {
|
||||||
let options = config.server.hmr;
|
let options = config.server.hmr;
|
||||||
options = options && typeof options !== 'boolean' ? options : {};
|
options = options && typeof options !== 'boolean' ? options : {};
|
||||||
const host = options.host || null;
|
const host = options.host || null;
|
||||||
|
|
Loading…
Reference in a new issue