[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; const { host, port } = config.server;
// load client runtime scripts ahead-of-time to fix "isSelfAccepting" bug during HMR // 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 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:*" // 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( const viteConfig = await createVite(
{ {
mode: 'development', mode: 'development',
server: { host }, server: { host },
optimizeDeps: { optimizeDeps: {
include: clientRuntimeFilePaths, include: clientRuntimeFilePaths,
} },
}, },
{ astroConfig: config, logging: options.logging, mode: 'dev' } { astroConfig: config, logging: options.logging, mode: 'dev' }
); );