Create React App recently removed the build --stats feature that enabled webpack-bundle-analyzer to function in favor of source-map-explorer. This is a HUGE step backwards.
If anybody can offer workarounds to get webpack-bundle-analyzer functioning again with CRA, it would be appreciated.
The --stats flag was included in 2.x as part of a workaround to visualizing bundles that uses code splitting and it was meant to be temporary (thus was never added to the docs). This was previously hard to do with source-map-explorer, however they were recently updated to support for multiple bundles. Since the primary purpose of source-map-explorer and webpack-bundle-analyzer is to show you what's inside the bundles as such we don't see a need to continue supporting both at this moment.
Yeah this issue is best discussed in CRA repository, it's not up to us what CRA supports although we can definitely help with CRA if they'd want the support there.
Just for reference, I've published the tool cra-bundle-analyzer to generate the bundle analyzer report:
https://www.npmjs.com/package/cra-bundle-analyzer
Hope it helps.
@svengau I just tried your tool, and it works awesome! Thank you so much!
You rock.
Most helpful comment
Just for reference, I've published the tool cra-bundle-analyzer to generate the bundle analyzer report:
https://www.npmjs.com/package/cra-bundle-analyzer
Hope it helps.