DEV Community

Discussion on: Maybe I Should Have Just Used create-react-app

Collapse
 
allurewebsolutions profile image
Mike Doubintchik

Could you please share you config of how you got Webpack Bundle Analyser working with the latest versions of CRA?

I'm trying the command react-scripts build --stats but it's not generating the bundle-stats.json file needed for bunde analyser.

Collapse
 
harri_etty profile image
Harriet

Hmm react-scripts is a create-react-app thing isn't it? In that case I'm not sure as I didn't use CRA and I had the option of adding the Webpack Bundle Analyser to my webpack configuration. Maybe this helps?

medium.com/@jbandi/you-can-use-cre...

Collapse
 
bugzpodder profile image
bugzpodder

This feature was deprecated in CRA 3.0. The recommended way is to use source-map-explorer:
facebook.github.io/create-react-ap...

You may have to remove the single quotes if you are on windows:
npx source-map-explorer build/static/js/*.js

Collapse
 
allurewebsolutions profile image
Mike Doubintchik

Yes, but I was hoping to get it working with the bundle analyzer as it has a better interface.

Thank you for confirming CRA 3.0 removed the bundle stats.