Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork48
See what packages are increasing your react-native bundle size 📦
License
callstack/react-native-bundle-visualizer
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
See what's inside of your react-native bundle 📦
Uses the awesomesource-map-explorer to visualize the output of theMetro bundler.
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.
Make surenpx is installed and run the following command in your project root
npx react-native-bundle-visualizer
yarn add --dev react-native-bundle-visualizer
And run it:
yarn run react-native-bundle-visualizeror when using npm:
npm install --save-dev react-native-bundle-visualizer ./node_modules/.bin/react-native-bundle-visualizerAll command-line arguments are optional. By default a production build will be created for theios platform.
| Option | Description | Example |
|---|---|---|
platform | Platform to build (default isios) | --platform ios |
dev | Dev or production build (default isfalse) | --dev false |
entry-file | Entry-file (when omitted tries to auto-resolve it) | --entry-file ./index.ios.js |
bundle-output | Output bundle-file (default istmp) | --bundle-output ./myapp.bundle |
format | Output formathtml,json ortsv (default ishtml) (seesource-map-explorer options) | --format json |
only-mapped | Exclude "unmapped" bytes from the output (default isfalse). This will result in total counts less than the file size. | --only-mapped |
verbose | Dumps additional output to the console (default isfalse) | --verbose |
reset-cache | Removes cached react-native files (default isfalse) | --reset-cache |
The
--expocommand is no longer needed for Expo SDK 41 or higher; and has been removed. Usereact-native-bundle-visualizer@2 when targetting Expo SDK 40 or lower.
| 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 theHaul bundler instead instead of the Metro output. |
About
See what packages are increasing your react-native bundle size 📦
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
