Skip to content

Commit

Permalink
Add Babel sourcemap to resolve VSCode debugging issues (#7022)
Browse files Browse the repository at this point in the history
  • Loading branch information
justingrant authored and mrmckeb committed Oct 10, 2019
1 parent ac93f31 commit 09cbb89
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,11 @@ module.exports = function(webpackEnv) {
]
),
// @remove-on-eject-end
// If an error happens in a package, it's possible to be
// because it was compiled. Thus, we don't want the browser
// debugger to show the original code. Instead, the code
// being evaluated would be much more helpful.
sourceMaps: false,
// Babel sourcemaps are needed for debugging into node_modules
// code. Without the options below, debuggers like VSCode
// show incorrect code and set breakpoints on the wrong lines.
sourceMaps: shouldUseSourceMap,
inputSourceMap: shouldUseSourceMap,
},
},
// "postcss" loader applies autoprefixer to our CSS.
Expand Down

0 comments on commit 09cbb89

Please sign in to comment.