Skip to content

Production bundle exceeds 500 kB — add code-splitting #5

Description

@CasperWA-ai-bot

Summary

vite build emits a single ~870 kB JS chunk (gzip ~268 kB), tripping Vite's default 500 kB chunk-size warning:

```
(!) Some chunks are larger than 500 kB after minification.
dist/assets/index-*.js 870.44 kB │ gzip: 267.86 kB
```

Context

Surfaced while validating the Vite 6→8 bump (PR #4). This is a pre-existing issue, not caused by the bump — out of scope for that PR.

Suggested fix

  • Use dynamic import() to code-split heavy deps (e.g. cytoscape, react-cytoscapejs, n3).
  • Or configure build.rolldownOptions.output.codeSplitting (Vite 8 / Rolldown) for manual chunking.
  • Or, if acceptable, raise build.chunkSizeWarningLimit.

Acceptance

vite build completes without the 500 kB warning, or chunks are intentionally split.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions