philomena-dev / philomena

Next-generation imageboard
GNU Affero General Public License v3.0
84 stars 29 forks source link

Vite HMR for JS/TS (and jankily for CSS) #242

Closed Meow closed 2 months ago

Meow commented 2 months ago

HMR aka vite's screwed up definition of live reload. Runs two vite instances (BECAUSE YAY), one just dumbly compiles static bundle for fonts and fallback theme to prevent FOUC, and the other is the dev server that does LiVe ReLoAdInG ThInGy because it's 2024 and apparently live reloading is all the rage so we cheaply as possible cosplay one of those fancy fabled SINGLE PAGE APPLICATION FRAMEWORKS because that's cool these days I guess

mdashlw commented 2 months ago

After this PR, it is now required to disable ublock origin on localhost when running in dev. uBlock blocks http://localhost:5173/js/fingerprint.js which is not handled and causes most js to fail as well.

Meow commented 2 months ago

After this PR, it is now required to disable ublock origin on localhost when running in dev. uBlock blocks http://localhost:5173/js/fingerprint.js which is not handled and causes most js to fail as well.

Sounds like a uBlock bug (why would it block stuff on localhost)