0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Prevent Vite watching on Astro config load (#7171)

This commit is contained in:
Bjorn Lu 2023-05-23 22:40:40 +08:00 committed by GitHub
parent 92d1f017e5
commit 79ba74832f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Prevent Vite watching on Astro config load

View file

@ -10,7 +10,7 @@ export interface ViteLoader {
async function createViteLoader(root: string, fs: typeof fsType): Promise<ViteLoader> {
const viteServer = await vite.createServer({
server: { middlewareMode: true, hmr: false },
server: { middlewareMode: true, hmr: false, watch: { ignored: ['**'] } },
optimizeDeps: { disabled: true },
clearScreen: false,
appType: 'custom',

View file

@ -65,7 +65,7 @@ export async function sync(
const tempViteServer = await createServer(
await createVite(
{
server: { middlewareMode: true, hmr: false },
server: { middlewareMode: true, hmr: false, watch: { ignored: ['**'] } },
optimizeDeps: { disabled: true },
ssr: { external: [] },
logLevel: 'silent',