0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

[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'); const { default: diff } = await import('micromorph');
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log(`[vite] hot updated: ${file}`); 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'); const doc = parser.parseFromString(html, 'text/html');
// Match incoming islands to current state // 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 { ViteDevServer, ModuleNode, HmrContext } from 'vite';
import type { PluginContext as RollupPluginContext, ResolvedId } from 'rollup'; import type { PluginContext as RollupPluginContext, ResolvedId } from 'rollup';
import { invalidateCompilation, isCached } from './compile.js'; import { invalidateCompilation, isCached } from './compile.js';
import { logger } from '../core/logger.js' import { logger } from '../core/logger.js';
import { green } from 'kleur/colors'; import { green } from 'kleur/colors';
interface TrackCSSDependenciesOptions { interface TrackCSSDependenciesOptions {
@ -75,9 +75,9 @@ export function handleHotUpdate(ctx: HmrContext, config: AstroConfig, logging: L
if (ctx.file.endsWith('.astro')) { if (ctx.file.endsWith('.astro')) {
const file = ctx.file.replace(config.projectRoot.pathname, '/'); const file = ctx.file.replace(config.projectRoot.pathname, '/');
logger.info('astro', green('hmr'), `${file}`) logger.info('astro', green('hmr'), `${file}`);
ctx.server.ws.send({ type: "custom", event: "astro:update", data: { file } }) ctx.server.ws.send({ type: 'custom', event: 'astro:update', data: { file } });
return [] return [];
} }
return Array.from(filtered); return Array.from(filtered);