//stupid hack to // - reload our config on every build // - make the jscc plugin work properly //why doesn't rollup watch do either of these things? no idea! const loadConfigFile = require("rollup/loadConfigFile"); const path = require("path"); const rollup = require("rollup"); const chokidar = require("chokidar"); const process = require("child_process"); let ready = false; const watch = chokidar.watch( ["./src", "./options.toml", "./rollup.config.js"], { persistent: true } ); watch.on("all", async (eve, path) => { if (ready) { process.execSync("pnpm run build"); } }); watch.on("ready", () => { console.log(`Watching files...`); ready = true; });