Duplicated JavaScript

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.

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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月08日 UTC.