Duplicated JavaScript
Stay organized with collections
Save and categorize content based on your preferences.
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.
In PageSpeed Insights and in the Lighthouse report, this button is in the Performance category below the metrics:
Lighthouse "View Treemap" button.
In the DevTools Performance Panel, this button is in the Duplicated JavaScript insight:
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
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-08 UTC."],[],[]]