diff options
author | 2022-04-26 15:59:31 -0400 | |
---|---|---|
committer | 2022-04-26 15:59:31 -0400 | |
commit | 22cb4b7b320428378633a3044f07a548dbbc8dc2 (patch) | |
tree | abbca6c626f983134f8dedf49859b47580beb4b5 | |
parent | 18762d6a0a3745f9c96b4a159624003be0f6a5f9 (diff) | |
download | astro-22cb4b7b320428378633a3044f07a548dbbc8dc2.tar.gz astro-22cb4b7b320428378633a3044f07a548dbbc8dc2.tar.zst astro-22cb4b7b320428378633a3044f07a548dbbc8dc2.zip |
Prevent watcher from running during the build (#3207)
* Prevent watcher from running during the build
* Adds a changeset
-rw-r--r-- | .changeset/big-ducks-search.md | 5 | ||||
-rw-r--r-- | packages/astro/src/core/create-vite.ts | 4 |
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 || {}, |