[ci] format

This commit is contained in:
bholmesdev 2022-06-06 13:28:30 +00:00 committed by github-actions[bot]
parent 85b905495d
commit ff6c9490a0

View file

@ -37,18 +37,20 @@ export default async function dev(config: AstroConfig, options: DevOptions): Pro
const { host, port } = config.server;
// load client runtime scripts ahead-of-time to fix "isSelfAccepting" bug during HMR
const clientRuntimeScripts = await glob(new URL('../../runtime/client/*.js', import.meta.url).pathname);
const clientRuntimeScripts = await glob(
new URL('../../runtime/client/*.js', import.meta.url).pathname
);
const clientRuntimeFilePaths = clientRuntimeScripts
.map(script => `astro/client/${path.basename(script)}`)
.map((script) => `astro/client/${path.basename(script)}`)
// fixes duplicate dependency issue in monorepo when using astro: "workspace:*"
.filter(filePath => filePath !== 'astro/client/hmr.js');
.filter((filePath) => filePath !== 'astro/client/hmr.js');
const viteConfig = await createVite(
{
mode: 'development',
server: { host },
optimizeDeps: {
include: clientRuntimeFilePaths,
}
},
},
{ astroConfig: config, logging: options.logging, mode: 'dev' }
);