Skip to content

Create React App no longer supporting webpack-bundle-analyzer #277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
n8sabes opened this issue Apr 26, 2019 · 4 comments
Closed

Create React App no longer supporting webpack-bundle-analyzer #277

n8sabes opened this issue Apr 26, 2019 · 4 comments

Comments

@n8sabes
Copy link

n8sabes commented Apr 26, 2019

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.

create-react-app issue #6904

If anybody can offer workarounds to get webpack-bundle-analyzer functioning again with CRA, it would be appreciated.

@bugzpodder
Copy link

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.

@valscion
Copy link
Member

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.

@svengau
Copy link

svengau commented Feb 8, 2020

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.

@n8sabes
Copy link
Author

n8sabes commented Feb 9, 2020

@svengau I just tried your tool, and it works awesome! Thank you so much!

You rock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants