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.
react-scripts build --stats
bundle-stats.json
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...
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
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.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 thebundle-stats.json
file needed for bunde analyser.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...
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
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.