React Native Bundle Discovery

Introduction

Visualize and analyze the JS bundle of your React Native app. Find heavy packages, duplicates and deprecated dependencies, inspect every module, and catch bundle size regressions in CI.

Bundle Discovery UI: Treemap, Insights and Packages tabs

Try it in the browser

Open the live demo: a real report in compare mode, built with react-native-bundle-discovery-ui build.

Features

  • πŸ“Š Interactive UI to explore packages, modules and their source/bundled code
  • πŸ’‘ Optimization recommendations ranked by estimated savings (duplicates, deprecated / outdated / dev-only packages, and more)
  • πŸ—ΊοΈ Treemap colored by package, file type or issues, and an "Imported by" graph for every module
  • ❓ "Why is this in my bundle?": the shortest import chain to any package
  • πŸ” CLI to list the heaviest packages and modules
  • πŸ†š Compare two reports in the UI (with per-module code diffs) or in CI, and fail on bundle size regressions
  • 🧩 Works with Metro, Re.Pack, Rollipop and React Native DevTools (via Rozenite)

Packages

PackageWhat it doesRequired
react-native-bundle-discoveryGenerates a JSON report (metro-stats.json) of your bundleβœ… Yes
react-native-bundle-discovery-uiShows the report in the browserOptional
react-native-bundle-discovery-cliAnalyzes and compares reports in the terminal / CIOptional
react-native-bundle-discovery-rozenite-pluginShows the UI inside React Native DevToolsOptional

On this page