[ci] format
This commit is contained in:
parent
85b905495d
commit
ff6c9490a0
1 changed files with 6 additions and 4 deletions
|
@ -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' }
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue