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:
parent
92d1f017e5
commit
79ba74832f
3 changed files with 7 additions and 2 deletions
5
.changeset/orange-lizards-report.md
Normal file
5
.changeset/orange-lizards-report.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Prevent Vite watching on Astro config load
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue