You can use create-react-app with webpack-bundle-analyzer without ejecting:

npm run build -- --stats

This generates the file bundle-stats.json in the public directory, which you then can use with webpack-bundle-analyzer:

npx webpack-bundle-analyzer ./build/bundle-stats-json

The feature is currently undocumented (documentation was removed), because the CRA team find the labelling of webpack-bundle-analyzer misleading, see:

I'm an enthusiastic software professional. Find out more about me at

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store