Duplicated JavaScript

Connor Clark
Connor Clark

Published: Oct 8, 2025

Remove large, duplicate JavaScript modules from bundles to reduce unnecessary bytes consumed by network activity.

How to pass this insight

  • For pages with multiple JavaScript bundles, code splits large dependencies needed by multiple bundles to a common bundle.
  • Within individual JavaScript bundles, ensure there is only one version of large dependencies.

You can dive deeper into the JavaScript bundles on a page by clicking the View Treemap. This opens the page's bundles in the Lighthouse Treemap.

Lighthouse Treemap. The colored nodes represent duplicate modules found across multiple JavaScript bundles
Lighthouse Treemap. The colored nodes represent duplicate modules found across multiple JavaScript bundles.
  • In PageSpeed Insights and in the Lighthouse report, this button is in the Performance category below the metrics:

    Lighthouse View Treemap button
    Lighthouse "View Treemap" button.
  • In the DevTools Performance Panel, this button is in the Duplicated JavaScript insight:

    DevTools Performance Panel View Treemap button
    DevTools Performance Panel "View Treemap" button.

Stack-specific guidance

Create an additional entry point for common, large dependencies and enable your JavaScript bundler's code splitting feature for the following:

Additional references