Skip to content

Code Splitting & Bundle Optimization #1028

@Patrick-Ehimen

Description

@Patrick-Ehimen

Production bundle analysis reveals critical performance issues: Pages Router (Builder.io marketing pages) ships 2.24 MB of JavaScript per page with the _app chunk alone weighing 1.98 MB, while App Router (docs/guides) performs reasonably at 183-414 KB. The 12x size difference between routing systems indicates poor code splitting, with Builder.io integration, duplicate dependencies (date-fns/dayjs), and eagerly loaded third-parties causing massive bundle bloat. Implementing strategic optimizations through dynamic imports, vendor chunk splitting, and route-based code splitting could reduce marketing page bundles by 60-70% and significantly improve Core Web Vitals scores.

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