Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source-map-loader to support source maps of dependencies #2355

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/react-scripts/config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,16 @@ 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: [
require.resolve("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 <style> tags.
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"promise": "7.1.1",
"react-dev-utils": "^3.0.0",
"react-error-overlay": "^1.0.7",
"source-map-loader": "^0.2.1",
"style-loader": "0.17.0",
"sw-precache-webpack-plugin": "0.9.1",
"url-loader": "0.5.8",
Expand Down