diff options
author | 2022-03-31 12:58:49 -0500 | |
---|---|---|
committer | 2022-03-31 12:58:51 -0500 | |
commit | 93e431967fa7c1ac71ccb64e064f10b1397de494 (patch) | |
tree | 7047b21abe8516154999b580780eda7794cce79b | |
parent | d10c3dea215bf0c7a4bfd037908c147d0cdffd05 (diff) | |
download | astro-93e431967fa7c1ac71ccb64e064f10b1397de494.tar.gz astro-93e431967fa7c1ac71ccb64e064f10b1397de494.tar.zst astro-93e431967fa7c1ac71ccb64e064f10b1397de494.zip |
chore: add code comment
Diffstat (limited to '')
-rw-r--r-- | packages/astro/src/vite-plugin-astro/hmr.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/astro/src/vite-plugin-astro/hmr.ts b/packages/astro/src/vite-plugin-astro/hmr.ts index fbc52262a..c51047cd7 100644 --- a/packages/astro/src/vite-plugin-astro/hmr.ts +++ b/packages/astro/src/vite-plugin-astro/hmr.ts @@ -81,6 +81,9 @@ export async function handleHotUpdate(ctx: HmrContext, config: AstroConfig, logg const mod = ctx.modules.find((m) => m.file === ctx.file); const file = ctx.file.replace(config.projectRoot.pathname, '/'); + + // Note: this intentionally ONLY applies to Astro components + // HMR is handled for other file types by their respective plugins if (ctx.file.endsWith('.astro')) { ctx.server.ws.send({ type: 'custom', event: 'astro:update', data: { file } }); } |