-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Solution: webpack-bundle-analyzer without ejecting. #3518
Comments
We generally recommend source-map-explorer which doesn't require ejecting or a monkey-patch. 😄 https://www.npmjs.com/package/source-map-explorer I'll close this, people can still find this through search if they're interested. |
@Timer yea the issue doesn't need to be open 👍 In general, |
I understand! We just try to not flood users with too many options, since you seem like a power user, your solution is fine. 😄 Just be aware it may break in the future, but you should be alright for a while. |
wanted to do this, but some how i'm getting `Error: Cannot find module 'webpack-bundle-analyzer' |
oh, silly me.. i installed webpack-bundle-size-analyzer instead |
In case anyone is using |
I think we are going to add this to CRA2 #3945 |
Add webpack-bundle-analyzer with ejecting, modify code in file: config/webpack.config.prod.js.
demo: https://github.com/cag2050/antd_mobx_demo/blob/master/config/webpack.config.prod.js |
Worth mentioning if you are using create-react-app with the Typescript settings, you need to change
|
@trevorwhealy |
For everyone coming here from google and using a recent version of react-scripts: {
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build --stats && webpack-bundle-analyzer build/bundle-stats.json -m static -r build/bundle-stats.html -O",
"test": "react-scripts test"
}
} to include |
Ejecting is a real shame for any instance of create-react-app, so I found a way to use webpack-bundle-analyzer without ejecting. Hopefully this will save someone out there from having to eject to make this addition.
node build.js
The text was updated successfully, but these errors were encountered: