Jonas Bandi
Dec 29, 2018 · 1 min read

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:

    Jonas Bandi

    Written by

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

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade