Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Prevent Vite watching on Astro config load (#7171)
  • Loading branch information
bluwy committed May 23, 2023
1 parent 92d1f01 commit 79ba748
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-lizards-report.md
@@ -0,0 +1,5 @@
---
'astro': patch
---

Prevent Vite watching on Astro config load
2 changes: 1 addition & 1 deletion packages/astro/src/core/config/vite-load.ts
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/sync/index.ts
Expand Up @@ -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',
Expand Down

0 comments on commit 79ba748

Please sign in to comment.