Move dev-only hooks into their own folder that isn't included in the build

This commit is contained in:
Eldritch-Oliver 2025-10-10 18:45:13 -06:00
parent 8de63e91c7
commit 803c1673e2
7 changed files with 37 additions and 4 deletions

View file

@ -1,16 +0,0 @@
import { Logger } from "../utils/Logger.mjs";
const loaders = {
svg(data) {
const iconName = data.path.split(`/`).slice(-1)[0].slice(0, -4);
Logger.debug(`hot-reloading icon: ${iconName}`);
Hooks.call(`${game.system.id}-hmr:svg`, iconName, data);
},
mjs() {window.location.reload()},
css() {window.location.reload()},
};
Hooks.on(`hotReload`, async (data) => {
if (!loaders[data.extension]) {return}
return loaders[data.extension](data);
});