mirror of
https://github.com/rommapp/romm.git
synced 2026-12-02 18:18:47 +01:00
Chaining the step onto the build script left `vite build` on its own without compression, and only worked because npm ran the chain. A plugin makes it part of the build itself, so there is nothing to bypass. It runs with enforce: post so the service worker vite-plugin-pwa emits is compressed too, and reads its output directory from the resolved config rather than assuming dist. The precache is generated earlier in the build and still lists no .gz entries. Written here rather than taken off the shelf: vite-plugin-compression was last published in 2022, vite-plugin-brotli caps at vite 7, and vite-plugin-compression2 declares no vite 8 support while depending on @rollup/pluginutils, which this rolldown-based build does not use. Node's zlib covers it in one file with no dependency. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HDXxq3vAxJVGhm1pQuK8V7