summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/big-ducks-search.md5
-rw-r--r--packages/astro/src/core/create-vite.ts4
2 files changed, 9 insertions, 0 deletions
diff --git a/.changeset/big-ducks-search.md b/.changeset/big-ducks-search.md
new file mode 100644
index 000000000..917145081
--- /dev/null
+++ b/.changeset/big-ducks-search.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Disables file watching during the build
diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts
index 982421043..cbb9bd0dd 100644
--- a/packages/astro/src/core/create-vite.ts
+++ b/packages/astro/src/core/create-vite.ts
@@ -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 || {},