Skip to content

Commit

Permalink
fix: ignore file watcher for non-dev server
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenle committed Apr 4, 2024
1 parent d430a6d commit 2c66a10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spotty-fireants-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@blinkk/root': patch
---

fix: ignore watcher for non-dev server
2 changes: 1 addition & 1 deletion packages/root/src/core/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export async function configureServerPlugins(
}
}

if (plugin.onFileChange) {
if (viteServer && plugin.onFileChange) {
viteServer.watcher.on('all', plugin.onFileChange);
}
}
Expand Down

0 comments on commit 2c66a10

Please sign in to comment.