PageSpeed Matters PageSpeed Matters
    See Pricing
    See Pricing

    Optimization Techniques · Glossary

    Code Splitting

    Matt Suffoletto

    Founder & CEOPublished

    On this page
    Code Splitting

    TL;DR

    Code splitting is a build-tool technique that breaks a JavaScript bundle into smaller chunks that are loaded on demand, typically per route or per dynamic import, instead of shipping the entire application as a single file.

    What is Code Splitting?

    Code splitting is a build-tool technique that breaks a JavaScript bundle into smaller chunks that are loaded on demand, typically per route or per dynamic import, instead of shipping the entire application as a single file.

    Learn more in our reducing JavaScript bundle size guide, or work with us through our done-for-you speed optimization service.

    How Code Splitting is Measured

    Modern bundlers such as Vite, webpack, and Rollup report bundle composition and chunk sizes after a build.

    Share

    Written by

    Matt Suffoletto

    Founder & CEO

    Sources

    Ready to Get Started?

    Get your site optimized in as little as 3 days. From $500.