Skip to content

Commit b621ccf

Browse files
committed
Enable source maps for webpack dev mode
Following along with facebook/create-react-app#924, enable source maps by default. This lets us see the actual code in chrome and firefox dev tools. Without the source maps, you view the transpiled code in dev tools.
1 parent ffc5783 commit b621ccf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

config/webpack.config.dev.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ var webpackConfigCommons = require('./webpack.config.commons')
1313
// It is focused on developer experience and fast rebuilds.
1414
// The production configuration is different and lives in a separate file.
1515
module.exports = {
16-
// This makes the bundle appear split into separate modules in the devtools.
17-
// We don't use source maps here because they can be confusing:
18-
// https://github.com/facebookincubator/create-react-app/issues/343#issuecomment-237241875
19-
// You may want 'cheap-module-source-map' instead if you prefer source maps.
20-
devtool: 'eval',
16+
// Integrate https://github.com/facebook/create-react-app/pull/924 here.
17+
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
18+
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.
19+
devtool: 'cheap-module-source-map',
20+
2121
// These are the "entry points" to our application.
2222
// This means they will be the "root" imports that are included in JS bundle.
2323
// The first two entry points enable "hot" CSS and auto-refreshes for JS.

0 commit comments

Comments
 (0)