summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2022-08-10 19:29:31 +0000
committerGravatar fredkbot <fred+astrobot@astro.build> 2022-08-10 19:29:31 +0000
commit5970ae077404f9682de5fd0c1f47c01710c4f9cc (patch)
tree7b5d978abf739998a434b766c63938c26b4896a1
parent561a34d91209c9d4959f74beaa17008edb27ff5d (diff)
downloadastro-5970ae077404f9682de5fd0c1f47c01710c4f9cc.tar.gz
astro-5970ae077404f9682de5fd0c1f47c01710c4f9cc.tar.zst
astro-5970ae077404f9682de5fd0c1f47c01710c4f9cc.zip
[ci] format
-rw-r--r--packages/astro/src/vite-plugin-astro/hmr.ts16
-rw-r--r--packages/astro/src/vite-plugin-astro/index.ts2
2 files changed, 9 insertions, 9 deletions
diff --git a/packages/astro/src/vite-plugin-astro/hmr.ts b/packages/astro/src/vite-plugin-astro/hmr.ts
index e307166db..c218998fa 100644
--- a/packages/astro/src/vite-plugin-astro/hmr.ts
+++ b/packages/astro/src/vite-plugin-astro/hmr.ts
@@ -150,14 +150,14 @@ export async function handleHotUpdate(
// If this is a module that is imported from a <script>, invalidate the Astro
// component so that it is cached by the time the script gets transformed.
- for(const mod of filtered) {
- if(mod.id && isAstroScript(mod.id) && mod.file) {
- const astroMod = ctx.server.moduleGraph.getModuleById(mod.file);
- if(astroMod) {
- mods.unshift(astroMod);
- }
- }
- }
+ for (const mod of filtered) {
+ if (mod.id && isAstroScript(mod.id) && mod.file) {
+ const astroMod = ctx.server.moduleGraph.getModuleById(mod.file);
+ if (astroMod) {
+ mods.unshift(astroMod);
+ }
+ }
+ }
// TODO: Svelte files should be marked as `isSelfAccepting` but they don't appear to be
const isSelfAccepting = mods.every((m) => m.isSelfAccepting || m.url.endsWith('.svelte'));
diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts
index 2e5eb54ff..393128803 100644
--- a/packages/astro/src/vite-plugin-astro/index.ts
+++ b/packages/astro/src/vite-plugin-astro/index.ts
@@ -362,7 +362,7 @@ ${source}
return handleHotUpdate.call(this, context, {
config,
logging,
- compile
+ compile,
});
},
};