Optimization Techniques · Glossary

    Code Splitting

    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.

    Read our guide: Website speed optimization guide. Or work with us through our done-for-you Core Web Vitals optimization services.

    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.