From ef5057c45cc6b8c33b3c169cd9d75b08df12e087 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Thu, 29 Oct 2026 16:06:22 -0500 Subject: [PATCH] fix: test --- scripts/dev.mjs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/dev.mjs b/scripts/dev.mjs index 2dcb80b74..e3e7e2e36 100644 --- a/scripts/dev.mjs +++ b/scripts/dev.mjs @@ -580,9 +580,18 @@ function watchPlugins(dir) { queue(() => rebuildPlugin(byId.get(id))), ); for (const plugin of plugins) { - watch(plugin.repo, true, (_event, filename) => { - if (isPluginEdit(plugin.repo, filename)) changed(plugin.id); - }); + // Only source folders, so node_modules and .git are never watched + const onEvent = (prefix) => (_event, filename) => { + const name = prefix + ? path.join(prefix, String(filename ?? "")) + : filename; + if (isPluginEdit(plugin.repo, name)) changed(plugin.id); + }; + watch(plugin.repo, false, onEvent("")); + for (const sub of ["src", "locales", "migrations"]) { + const target = path.join(plugin.repo, sub); + if (fs.existsSync(target)) watch(target, true, onEvent(sub)); + } } log(`watching ${plugins.length} plugin(s) in ${dir}`); }