Prevent watcher from running during the build (#3207)

* Prevent watcher from running during the build

* Adds a changeset
This commit is contained in:
Matthew Phillips 2022-04-26 15:59:31 -04:00 committed by GitHub
parent 18762d6a0a
commit 22cb4b7b32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Disables file watching during the build

View file

@ -83,6 +83,10 @@ export async function createVite(
proxy: {
// add proxies here
},
watch: {
// Prevent watching during the build to speed it up
ignored: mode === 'build' ? ['**'] : undefined,
}
},
css: {
postcss: astroConfig.style.postcss || {},