[ci] yarn format

This commit is contained in:
natemoo-re 2022-02-24 19:12:33 +00:00 committed by GitHub Actions
parent 5091d788f6
commit 30106e584f
2 changed files with 5 additions and 5 deletions

View file

@ -4,7 +4,7 @@ if (import.meta.hot) {
const { default: diff } = await import('micromorph');
// eslint-disable-next-line no-console
console.log(`[vite] hot updated: ${file}`);
const html = await fetch(`${window.location}`).then(res => res.text());
const html = await fetch(`${window.location}`).then((res) => res.text());
const doc = parser.parseFromString(html, 'text/html');
// Match incoming islands to current state

View file

@ -3,7 +3,7 @@ import type { LogOptions } from '../core/logger.js';
import type { ViteDevServer, ModuleNode, HmrContext } from 'vite';
import type { PluginContext as RollupPluginContext, ResolvedId } from 'rollup';
import { invalidateCompilation, isCached } from './compile.js';
import { logger } from '../core/logger.js'
import { logger } from '../core/logger.js';
import { green } from 'kleur/colors';
interface TrackCSSDependenciesOptions {
@ -75,9 +75,9 @@ export function handleHotUpdate(ctx: HmrContext, config: AstroConfig, logging: L
if (ctx.file.endsWith('.astro')) {
const file = ctx.file.replace(config.projectRoot.pathname, '/');
logger.info('astro', green('hmr'), `${file}`)
ctx.server.ws.send({ type: "custom", event: "astro:update", data: { file } })
return []
logger.info('astro', green('hmr'), `${file}`);
ctx.server.ws.send({ type: 'custom', event: 'astro:update', data: { file } });
return [];
}
return Array.from(filtered);