Make a mixin for loading a stylesheet for components, including HMR auto-update support (only in devMode)

This commit is contained in:
Oliver-Akins 2024-04-13 12:18:36 -06:00
parent fde3881653
commit f2c169c077
4 changed files with 121 additions and 55 deletions

View file

@ -35,6 +35,10 @@ const loaders = {
},
js() {window.location.reload()},
mjs() {window.location.reload()},
css(data) {
console.debug(`.dungeon | Hot-reloading CSS: ${data.path}`);
Hooks.call(`dd-hmr:css`, data);
},
};
Hooks.on(`hotReload`, async (data) => {