analyze-cra-bundle
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

analyze-cra-bundle

oclif Version Downloads/week License

Keep an eye on your Create React App bundle size 📦

Assess impact of new code/deps on the end-user initial bundle size and monitor it directly in your Pull Request changes via TravisCI. 🔎

It makes sure to track only CRA JS chunks present in index.html.

ℹ️ This package is in its early stages. More features on the way. Suggestions welcome!

Installation

$ yarn add --dev analyze-cra-bundle

Usage

$ analyze-cra-bundle

OPTIONS
  -f, --buildFolderPath=buildFolderPath  [default: build]
  -h, --help                             show help
  -v, --version                          show version

Output screenshot

⚠️ Warning: Make sure to build your app before running the command: yarn build && analyze-cra-bundle

TravisCI Integration

Keep an eye on the bundle size in your Pull Requests with a extra status check 👀

Pull Request screenshot

  • Add a Github Access Token as ANALYZE_CRA_GITHUB_TOKEN to your environment variables in the TravisCI project settings.
  • Add the script "bundlesize": "analyze-cra-bundle" to your package.json scripts
  • Add - yarn bundlesize to your .travis.yml within script:

(Create an issue if you're having trouble with this!)

Dependencies (8)

Dev Dependencies (7)

Package Sidebar

Install

npm i analyze-cra-bundle

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

10.1 kB

Total Files

9

Last publish

Collaborators

  • petecorreia