https://github.com/byzyk/react-app-rewire-webpack-bundle-analyzer
Add webpack-bundle-analyzer to a react-app-rewired config.
https://github.com/byzyk/react-app-rewire-webpack-bundle-analyzer
create-react-app react react-app-rewire react-app-rewired webpack webpack-bundle-analyzer
Last synced: about 1 year ago
JSON representation
Add webpack-bundle-analyzer to a react-app-rewired config.
- Host: GitHub
- URL: https://github.com/byzyk/react-app-rewire-webpack-bundle-analyzer
- Owner: byzyk
- License: mit
- Created: 2018-06-03T07:57:54.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T16:19:34.000Z (over 3 years ago)
- Last Synced: 2025-03-27T02:21:29.926Z (about 1 year ago)
- Topics: create-react-app, react, react-app-rewire, react-app-rewired, webpack, webpack-bundle-analyzer
- Language: JavaScript
- Size: 104 KB
- Stars: 22
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-app-rewire-webpack-bundle-analyzer
[](https://www.npmjs.com/package/react-app-rewire-webpack-bundle-analyzer)
[](https://github.com/byzyk/react-app-rewire-webpack-bundle-analyzer/blob/master/LICENSE)
> Add [`webpack-bundle-analyzer`](https://github.com/webpack-contrib/webpack-bundle-analyzer) to [`react-app-rewired`](https://github.com/timarney/react-app-rewired) config.
## Install
```sh
npm install --save-dev react-app-rewire-webpack-bundle-analyzer
```
## Usage
```js
const rewireWebpackBundleAnalyzer = require('react-app-rewire-webpack-bundle-analyzer')
module.exports = function override(config, env) {
// ...
if (env === 'production') {
config = rewireWebpackBundleAnalyzer(config, env, {
analyzerMode: 'static',
reportFilename: 'report.html'
})
}
return config
}
```
## License
MIT © [Bohdan Khodakivskyi](https://bohdan-khodakivskyi.com)