npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-bundle-size

v1.1.0

Published

Get react-native bundle size for last commits

Downloads

18

Readme

react-native-bundle-size

Get react-native bundle size for last commits. This cli basically iterates over your last commits and run repeatadly npx react-native bundle.

Inspiration

This repo is inpired by awesome react-native-bundle-visualizer by Hein Rutjes. It provides visual way to find what package is bloating your react-native JS bundle. Sometimes it is not really easy to see how some big package even got there in first place. react-native-bundle-size helps you find the commit where it happend.

Running

Try it now from within your react-native folder.

npx react-native-bundle-size .

After a while it outputs commit hash, size in bytes and commit messsage.

5cb97d54 4372544 Add new feature

You can also specify for how many commits would you like to see bundle size. Remember to commit all your changes. Be aware that creating bundle size takes some time.

npx react-native-bundle-size . -l 3

Whis outputs three lines

5cb97d54 4372204 Release
5cb97d54 4372544 Add new feature
5cb97d54 3345544 Refactor

Options

$ react-native-bundle-size
  Get react-native bundle size for last commits

  Usage
      $ bundlesize pathToReactNativeApp

  Options
      --limit, -l <n>              How many commits to iterate over. Default 1.
      --skip, -s <n>               How many commits to skip. Default 0.
      --platform, -p <ios|android>   What platform to build bundle for. Default "ios".
      --entryFile, -e <./index.js> Path to index.js file. Default "./index.js".

  Examples
      $ bundlesize .
      $ bundlesize . -l 5 -s 10 -e ./src/index.js

Development

git clone https://github.com/RobertSasak/react-native-bundle-size
code . # Perform any changes
npm link # make it available locally
react-native-bundle-size ../path-to-your-react-native-folder # Try your changes