fix(frontend): contain hover-video to miximage frame + restore dev HMR

The miximage hover video had no height bound, so a tall/narrow source
overflowed the cover. Match the miximage frame's box and `object-fit:
cover` it so the clip fills the bezel screen and crops instead of
spilling past it.

Also gate the PWA dev service worker behind DEV_PWA: it intercepted dev
requests and forced full page reloads on every edit (CSS included),
defeating HMR. Default dev now gets working HMR; set DEV_PWA=true to test
the PWA in dev.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Georges-Antoine Assi
2026-06-25 17:16:00 -04:00
parent a5e3150187
commit f6bc5264d5
2 changed files with 8 additions and 3 deletions

View File

@@ -358,9 +358,10 @@ defineExpose({
.game-cover__video {
position: absolute;
top: 0.75rem;
left: 0.35rem;
left: 0.3rem;
width: 97%;
object-fit: contain;
aspect-ratio: 745 / 550;
object-fit: cover;
opacity: 0;
transition: opacity 0.35s ease;
pointer-events: none;

View File

@@ -67,6 +67,10 @@ export default defineConfig(({ mode }) => {
const backendPort = env.DEV_PORT ?? "5000";
// const devMode = env.DEV_MODE === "true";
const httpsMode = env.DEV_HTTPS === "true";
// The PWA service worker intercepts dev requests and forces full page
// reloads on edits (CSS included), defeating HMR. Keep it off in dev unless
// explicitly testing the PWA (DEV_PWA=true).
const pwaDevEnabled = env.DEV_PWA === "true";
return {
optimizeDeps: {
@@ -96,7 +100,7 @@ export default defineConfig(({ mode }) => {
],
},
devOptions: {
enabled: true,
enabled: pwaDevEnabled,
type: "module",
},
}),