fix: esbuild css minifier — lightningcss folds animation-timeline into the animation shorthand (invalid), silently killing scroll-driven effects in production

This commit is contained in:
2026-07-28 21:25:59 +02:00
parent bbbb090cce
commit c6de06f017
+7
View File
@@ -13,6 +13,13 @@ export default defineConfig({
prefetch: { prefetchAll: true }, prefetch: { prefetchAll: true },
server: { port: 4321, host: true }, server: { port: 4321, host: true },
vite: { vite: {
build: {
// Lightning CSS (the default minifier) illegally folds animation-timeline
// INTO the `animation` shorthand (`animation: ... view()`), which browsers
// reject — silently killing every scroll-driven effect in production.
// esbuild minifies without property merging.
cssMinify: 'esbuild',
},
server: { server: {
// Vite blocks unknown Host headers by default; the demo is viewed through an // Vite blocks unknown Host headers by default; the demo is viewed through an
// ephemeral cloudflared quick tunnel, so allow any *.trycloudflare.com host. // ephemeral cloudflared quick tunnel, so allow any *.trycloudflare.com host.