Skip to content

Commit

Permalink
watch mode only on file changes (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-piotrowicz authored Jul 31, 2023
1 parent 53ad429 commit 5aefce5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .changeset/wet-laws-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@cloudflare/next-on-pages': patch
---

watch mode only on file changes

only watch for file changes instead of watching for all possible changes (such as directories additions/removals, etc...),
making sure that we don't rerun the build process unnecessarily
2 changes: 1 addition & 1 deletion packages/next-on-pages/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ function setWatchMode(fn: () => void): void {
'package.json',
],
ignoreInitial: true,
}).on('all', fn);
}).on('change', fn);
}

0 comments on commit 5aefce5

Please sign in to comment.