mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-06-16 18:39:21 +08:00
Add Babel sourcemap to resolve VSCode debugging issues (#7022)
This commit is contained in:
committed by
Brody McKee
parent
ac93f310bf
commit
09cbb89d44
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user