Splitting the bundle would only silence Vite's 500 kB warning. The real saving is transport compression: nginx serves the 590 kB bundle without gzip (184 kB compressed), and that setting lives in the shared web-stack config, not in this repo. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
beim build kommt immer folgender output:
../dist/assets/index-CPWPKF3g.js 578.97 kB │ gzip: 180.43 kB │ map: 2,777.11 kB
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
- was bedeutet das?
- kann man das "fixen"?
Antwort (User-Wahl: nichts ändern):
- Die Meldung ist nur ein Hinweis von Vite, kein Fehler. Sie erscheint bei jedem Chunk über 500 kB (minifiziert).
- Das Hauptbundle (590 kB) besteht zur Hälfte aus Pixi (300 kB: Grafik, Text, Container, Renderer, also fast nur Benutztes) und zur Hälfte aus eigenem Code (287 kB, davon Editor 130, Core 97, UI 40). Code-Splitting per
import()bringt nichts, weil der Editor beim Start alles braucht. - „Fixen“ ginge über einen eigenen Pixi-Chunk (
manualChunks, beide Teile unter 500 kB, Pixi bleibt nach einem Deploy im Cache) oder über eine höhere Warngrenze (chunkSizeWarningLimit). An der Gesamtgröße ändert beides nichts. - Größerer Hebel: nginx liefert JS unkomprimiert aus, weil
gzipin der Konfiguration des Web-Stacks aus ist (590 kB statt 184 kB mit gzip, gemessen). Das Modulgzip_staticist im Container vorhanden.