Skip to content
Closed
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
21 changes: 18 additions & 3 deletions packages/gatsby/src/utils/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,27 @@ module.exports = async (
switch (stage) {
case `develop`:
return `cheap-module-source-map`
// use a normal `source-map` for the html phases since
// use a normal `source-map` for the develop-html phase since
// it gives better line and column numbers
case `develop-html`:
case `build-html`:
case `build-javascript`:
return `source-map`

// Source maps expose too much information about the site so
// we don't generate them by default.
//
// You can easily enable them in your `gatsby-node.js` but make
// sure that your web server restricts access to them (e.g. with
// basic auth):
//
// exports.modifyWebpackConfig = ({ actions, stage }) => {
// switch (stage) {
// case `build-html`:
// case 'build-javascript':
// actions.setWebpackConfig({
// devtool: 'source-map'
// })
// }
// }
default:
return false
}
Expand Down