cactbot
cactbot copied to clipboard
build: Add Hot Reloading for Raidboss Skins
Summary
Webpack currently does not hot reload skins within the skins folder like it does changes to the raidboss.css file, which makes new skin authorship a little clunky.
too lazy to send a PR for this
diff --git a/webpack/webpack.config.ts b/webpack/webpack.config.ts
index b28eecd02..32f952adf 100644
--- a/webpack/webpack.config.ts
+++ b/webpack/webpack.config.ts
@@ -112,6 +112,7 @@ export default (
path.join(__dirname, '../dist/resources/sounds'),
path.join(__dirname, '../dist/ui/raidboss/skins/'),
],
+ watchFiles: ['./ui/raidboss/skins'],
devMiddleware: {
writeToDisk: true,
},
This is not quite enough. From what I can tell, the dev server sees that the files have changed and rebuilds, but doesn't end up reloading the overlays to use them because it doesn't know about any dependency there.
Also, I think it should be:
diff --git a/webpack/webpack.config.ts b/webpack/webpack.config.ts
index 9556dfc81..8cdcc22ae 100644
--- a/webpack/webpack.config.ts
+++ b/webpack/webpack.config.ts
@@ -112,6 +112,9 @@ export default (
path.join(__dirname, '../dist/resources/sounds'),
path.join(__dirname, '../dist/ui/raidboss/skins/'),
],
+ watchFiles: [
+ './ui/**/skins/',
+ ],
devMiddleware: {
writeToDisk: true,
},