From 3a3765c9eca678e10fb7f172f2e6b5743892e3d3 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 19 Apr 2025 16:00:57 -0600 Subject: [PATCH] Add a comment so I don't forget why the watcher plugin was needed --- vite.config.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index 5f08d5a..b3f69d8 100644 --- a/vite.config.js +++ b/vite.config.js @@ -23,6 +23,12 @@ function fileMarkerPlugin() { }; }; +/* +The intent of this plugin is to make so that Rollup watches files +that are not in the module graph (i.e. not imported in a JS file), +allowing for rebuilds when the module's manifest changes, or when +handlebars is updated. +*/ function watcher(...globs) { return { buildStart() { @@ -44,7 +50,7 @@ export default defineConfig(({ mode }) => { if (!isProd) { plugins.push( watcher( - `./public/module.json`, + `./public`, ), fileMarkerPlugin(), );