xxxxxxxxxx
// Reference: https://create-react-app.dev/docs/analyzing-the-bundle-size/
// Step-1
Using NPM :
npm install --save source-map-explorer
or using yarn:
yarn add source-map-explorer
// Step-2
Add the script:
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
}
// Step-3
npm run build
npm run analyze
Ensure that the GENERATE_SOURCEMAP is not set to false
in build command for local while analyzing.