PageSpeed Matters PageSpeed Matters
    See Pricing
    See Pricing

    Optimization Techniques · Glossary

    Tree Shaking & Minification

    Matt Suffoletto

    Founder & CEOPublished

    On this page
    Tree Shaking & Minification

    TL;DR

    Minification removes unnecessary characters (whitespace, comments, long variable names) from HTML, CSS, and JavaScript, while tree shaking is a build-time process that eliminates unused exports from JavaScript modules.

    What is Tree Shaking & Minification?

    Minification removes unnecessary characters (whitespace, comments, long variable names) from HTML, CSS, and JavaScript, while tree shaking is a build-time process that eliminates unused exports from JavaScript modules.

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

    How Tree Shaking & Minification is Measured

    Lighthouse reports the potential savings from minifying CSS and JavaScript and from removing unused JavaScript.

    Share

    Written by

    Matt Suffoletto

    Founder & CEO

    Sources

    Ready to Get Started?

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