Skip to content
Analyse your React Native bundle in 1 command
Branch: master
Clone or download
JonnyBurger Add custom port (#6)
Add custom port
Latest commit 2c99a48 May 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Tweaks to the flow May 8, 2019
.gitignore v1.1.0 Apr 17, 2019
LICENSE README Apr 15, 2019
README.md Update README.md May 8, 2019
credit.png README Apr 15, 2019
npx-visualize-bundle.gif README Apr 15, 2019
package-lock.json bump version May 8, 2019
package.json bump version May 8, 2019
tsconfig.json

README.md

npx visualize-bundle

npx visualize-bundle allows you to inspect your React Native bundle in just one command and to diagnose big modules.

Just like on the web, you want to make your JavaScript file as small as possible. Whenever your app opens, the phone needs to parse the whole JavaScript bundle before it can run the React Native code. On lower-end phones, a big bundle can be a bottleneck on startup performance.

This package simply downloads the bundle and the sourcemap from the running packager and uses source-map-explorer to visualize it.

Usage

No installation is needed, just type

npx visualize-bundle

into the command line. The npx command is available with npm 5.2 or later.

By default the iOS production bundle is being analyzed. The following options are available:

-a, --android         analyse Android bundle 
-d, --dev             analyse developement bundle
-o, --output [dir]    output directory
-p, --port [port]     use custom port
-j, --json            save output as JSON file instead of HTML
-v, --version         print the version number
-h, --help            print usage information

Development

Contributions are welcome - You can clone the repository and start the tool using npm start.

License

MIT


You can’t perform that action at this time.