Skip to content

Commit 0fad4c0

Browse files
committed
build: add source-map-loader to webpack config
1 parent 6223fd9 commit 0fad4c0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/react-scripts/config/webpack.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,13 @@ module.exports = function (webpackEnv) {
376376
],
377377
include: paths.appSrc,
378378
},
379+
// Handle node_modules packages that contain sourcemaps
380+
shouldUseSourceMap && {
381+
enforce: 'pre',
382+
exclude: /@babel(?:\/|\\{1,2})runtime/,
383+
test: /\.(js|mjs|jsx|ts|tsx|css)$/,
384+
use: 'source-map-loader',
385+
},
379386
{
380387
// "oneOf" will traverse all following loaders until one will
381388
// match the requirements. When no loader matches it will fall

0 commit comments

Comments
 (0)