Skip to content

Instantly share code, notes, and snippets.

@samccone
Created January 19, 2019 17:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samccone/00435b5964ff9fff82acf273bbc76713 to your computer and use it in GitHub Desktop.
Save samccone/00435b5964ff9fff82acf273bbc76713 to your computer and use it in GitHub Desktop.
How to export webpack stats.json and debug sourcemaps from create react app

goto:

node_modules/react-scripts/config/webpack.config.dev.js

Change:

devtool: 'cheap-module-source-map',

To:

devtool: 'source-map',

then run:

yarn run build -- --stats

inside of build/

See bundle-stats.json and static/js/*.map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment