Switch back to fs watcher

This commit is contained in:
2026-04-21 16:25:57 +01:00
parent e2b8b95a4b
commit cd9ac833dc
10 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ export default async function chokadirWatcherEsbuildCTX() {
.on("unlink", (path) => handleEvent("unlink", path))
.on("addDir", (path) => handleEvent("addDir", path))
.on("unlinkDir", (path) => handleEvent("unlinkDir", path));
global.PAGES_SRC_WATCHER = watcher;
// global.PAGES_SRC_WATCHER = watcher;
}
function reloadWatcher() {
if (global.PAGES_SRC_WATCHER) {
+2 -2
View File
@@ -1,7 +1,7 @@
import { log } from "../../utils/log";
import allPagesESBuildContextBundler from "../bundler/all-pages-esbuild-context-bundler";
import chokadirWatcherEsbuildCTX from "./chokidar-watcher-esbuild-ctx";
import serverPostBuildFn from "./server-post-build-fn";
import watcherEsbuildCTX from "./watcher-esbuild-ctx";
export default async function fullRebuild(params) {
try {
const { msg } = params || {};
@@ -31,6 +31,6 @@ export default async function fullRebuild(params) {
}
if (global.PAGES_SRC_WATCHER) {
global.PAGES_SRC_WATCHER.close();
chokadirWatcherEsbuildCTX();
watcherEsbuildCTX();
}
}
+5 -5
View File
@@ -98,11 +98,11 @@ export default async function watcherEsbuildCTX() {
msg: `${type} ${action}: ${filename}. Rebuilding ...`,
});
});
// global.PAGES_SRC_WATCHER = pages_src_watcher;
global.PAGES_SRC_WATCHER = pages_src_watcher;
}
function reloadWatcher() {
// if (global.PAGES_SRC_WATCHER) {
// global.PAGES_SRC_WATCHER.close();
// watcherEsbuildCTX();
// }
if (global.PAGES_SRC_WATCHER) {
global.PAGES_SRC_WATCHER.close();
watcherEsbuildCTX();
}
}