Skip to content

Commit

Permalink
Prevent watcher from running during the build (#3207)
Browse files Browse the repository at this point in the history
* Prevent watcher from running during the build

* Adds a changeset
  • Loading branch information
matthewp authored Apr 26, 2022
1 parent 18762d6 commit 22cb4b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-ducks-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Disables file watching during the build
4 changes: 4 additions & 0 deletions packages/astro/src/core/create-vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {},
Expand Down

0 comments on commit 22cb4b7

Please sign in to comment.