Files
feuerwerk/todo-notes/done/build-chunks.md
T
rootandClaude Opus 5 8df4b8dfc2 Close the build-chunks note: the size is Pixi plus editor, all loaded at start
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>
2026-09-11 21:22:16 +02:00

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 gzip in der Konfiguration des Web-Stacks aus ist (590 kB statt 184 kB mit gzip, gemessen). Das Modul gzip_static ist im Container vorhanden.