From f1d82951d03659fcb9f7a1dc1e27a1166e1d8fc8 Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Wed, 24 May 2017 17:14:25 -0700 Subject: [PATCH 01/16] Add source-map-loader to support source maps of dependencies --- packages/react-scripts/config/webpack.config.dev.js | 8 ++++++++ packages/react-scripts/package.json | 1 + 2 files changed, 9 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index adf92f5b124..a02b68969e8 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -199,6 +199,14 @@ module.exports = { cacheDirectory: true, }, }, + // "source-map-loader" will look for .js.map files within dependencies and + // use the maps during development. This allows us to see the source code + // for dependencies as we develop our app. + { + test: /\.js$/, + use: ["source-map-loader"], + enforce: "pre" + }, // "postcss" loader applies autoprefixer to our CSS. // "css" loader resolves paths in CSS and adds assets as dependencies. // "style" loader turns CSS into JS modules that inject