Skip to content

Commit

Permalink
Better source maps in dev and prod.
Browse files Browse the repository at this point in the history
Relevent discussion in facebookincubator/create-react-app: facebook/create-react-app#343.
  • Loading branch information
jaydenseric committed Nov 29, 2016
1 parent abc462f commit 1e12b68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ const config = {
}

if (process.env.NODE_ENV === 'production') {
config.devtool = 'source-map'
config.plugins.push(
new webpack.optimize.UglifyJsPlugin({
comments: false
comments: false,
sourceMap: true
})
)
} else {
config.devtool = 'eval'
config.devtool = 'cheap-module-source-map'
config.plugins.push(new webpack.NoErrorsPlugin())
}

Expand Down

0 comments on commit 1e12b68

Please sign in to comment.