message: attempt to fix the watcher
diff: @@ -41,20 +41,18 @@ if (args.serve) {
  const changes = new Set();
  console.log("Watching for changes...");
  + let timer = 0;
  +
  async function rebuild() {
  - if (!changes.size) {
  - return;
  - }
  + console.log("Changes detected. Building...");
  + const files = new Set(changes);
  + changes.clear();
  - console.log("Changes detected. Reloading...");
  - await site.update(changes);
  + await site.update(files);
  await update();
  - changes.clear();
  console.log("");
  }
  - setInterval(rebuild, 500);
  -
  for await (const event of watcher) {
  if (event.paths.every((path) => path.startsWith(site.options.dest))) {
  continue;
  @@ -63,6 +61,10 @@ if (args.serve) {
  event.paths.forEach((path) =>
  changes.add(join("/", relative(site.options.src, path)))
  );
  +
  + //Debounce
  + clearTimeout(timer);
  + timer = setTimeout(rebuild, 500);
  }
  } catch (err) {
  console.log(err);
  