chore: add code comment

This commit is contained in:
Nate Moore 2022-03-31 12:58:49 -05:00
parent d10c3dea21
commit 93e431967f

View file

@ -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 } });
}