Giter Club home page Giter Club logo

react-native-bundle-visualizer's Introduction

react-native-bundle-visualizer

See what's inside of your react-native bundle ๐Ÿ“ฆ

bundle-visualizer-animation

Uses the awesome source-map-explorer to visualize the output of the Metro bundler.

Purpose

Sometimes, importing a single javascript library can drastically increase your bundle size. This package helps you to identify such a library, so you can keep the bundle size low and loading times fast.

Usage

Make sure npx is installed and run the following command in your project root

npx react-native-bundle-visualizer

Or install as a dev-dependency

yarn add --dev react-native-bundle-visualizer

And run it:

yarn run react-native-bundle-visualizer

or when using npm:

npm install --save-dev react-native-bundle-visualizer ./node_modules/.bin/react-native-bundle-visualizer

Command line arguments

All command-line arguments are optional. By default a production build will be created for the ios platform.

Option Description Example
platform Platform to build (default is ios) --platform ios
dev Dev or production build (default is false) --dev false
entry-file Entry-file (when omitted tries to auto-resolve it) --entry-file ./index.ios.js
bundle-output Output bundle-file (default is tmp) --bundle-output ./myapp.bundle
format Output format html, json or tsv (default is html) (see source-map-explorer options) --format json
only-mapped Exclude "unmapped" bytes from the output (default is false). This will result in total counts less than the file size. --only-mapped
verbose Dumps additional output to the console (default is false) --verbose
reset-cache Removes cached react-native files (default is false) --reset-cache
--expo Set this to true/ false based on whether using expo or not. For eg, set --expo true when using expo. Not required to pass this for react-native cli. (default is false) --expo false

Use react-native-bundle-visualizer@2 when targetting Expo SDK 40 or lower.

Version compatibility

Version Comments
3.x Compatible with React-Native CLI bootstrapped projects and Expo SDK 41 or higher.
2.x Compatible with React-Native CLI bootstrapped projects and Expo SDK 40 or earlier.
1.x Uses the Haul bundler instead instead of the Metro output.

License

MIT

react-native-bundle-visualizer's People

Contributors

ijzerenhein avatar hurali97 avatar evanbacon avatar omerg avatar dependabot[bot] avatar ofir-oron avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.