1 min readDec 29, 2018
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: https://github.com/facebook/create-react-app/issues/4563