Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/svengau/cra-bundle-analyzer
Use Webpack Bundle Analyzer on a create-react-app application without ejecting
https://github.com/svengau/cra-bundle-analyzer
create-react-app react reactjs webpack webpack-bundle-analyzer
Last synced: 2 days ago
JSON representation
Use Webpack Bundle Analyzer on a create-react-app application without ejecting
- Host: GitHub
- URL: https://github.com/svengau/cra-bundle-analyzer
- Owner: svengau
- Created: 2020-02-08T09:06:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T23:47:51.000Z (almost 2 years ago)
- Last Synced: 2024-11-09T05:12:42.560Z (6 days ago)
- Topics: create-react-app, react, reactjs, webpack, webpack-bundle-analyzer
- Language: JavaScript
- Size: 233 KB
- Stars: 47
- Watchers: 4
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![npm][npm]][npm-url]
[![node][node]][node-url]
[![downloads][downloads]][downloads-url]This package allows to use [webpack-bundle-analyzer](https://www.npmjs.com/package/webpack-bundle-analyzer) with [create-react-app](https://create-react-app.dev), without having to eject the react application.
It's an alternative to the official [source-map-explorer](https://create-react-app.dev/docs/analyzing-the-bundle-size).
## Installation
```bash
# NPM
npm install --save-dev cra-bundle-analyzer
# Yarn
yarn add -D cra-bundle-analyzer
```## Usage
```bash
npx cra-bundle-analyzer
```This command will generate the webpack-bundle-analyzer report in `build/report.html`
## Options
```
-r, --reportFilename Path to bundle report file that will be generated in `static` mode. (default: report.html)
```## References
- [Github Issue #6904: --stats flag is gone in v3?](https://github.com/facebook/create-react-app/issues/6904)
- [Github Issue #3518: webpack-bundle-analyzer without ejecting.](https://github.com/facebook/create-react-app/issues/3518)
- [Medium @romanonthego: webpack-bundle-analyzer for create-react-app](https://medium.com/@romanonthego/webpack-bundle-analyzer-for-create-react-app-9aebb0d01084)[npm]: https://img.shields.io/npm/v/cra-bundle-analyzer.svg
[npm-url]: https://npmjs.com/package/cra-bundle-analyzer
[node]: https://img.shields.io/node/v/cra-bundle-analyzer.svg
[node-url]: https://nodejs.org
[deps]: https://david-dm.org/webpack-contrib/cra-bundle-analyzer.svg
[deps-url]: https://david-dm.org/webpack-contrib/cra-bundle-analyzer
[tests]: http://img.shields.io/travis/webpack-contrib/cra-bundle-analyzer.svg
[tests-url]: https://travis-ci.org/webpack-contrib/cra-bundle-analyzer
[downloads]: https://img.shields.io/npm/dt/cra-bundle-analyzer.svg
[downloads-url]: https://npmjs.com/package/cra-bundle-analyzer