Skip to content

Commit 0dc9435

Browse files
committed
Turn off sourcemaps in production
1 parent 8c69a78 commit 0dc9435

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gatsby-node.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ exports.onCreateNode = ({node, actions, getNode}) => {
6363
}
6464
}
6565

66-
exports.onCreateWebpackConfig = ({actions}) => {
66+
exports.onCreateWebpackConfig = ({stage, actions}) => {
6767
actions.setWebpackConfig({
6868
resolve: {
6969
alias: {
@@ -72,6 +72,12 @@ exports.onCreateWebpackConfig = ({actions}) => {
7272
extensions: ['.js'],
7373
},
7474
})
75+
76+
if (stage === `build-javascript`) {
77+
actions.setWebpackConfig({
78+
devtool: false,
79+
})
80+
}
7581
}
7682

7783
exports.createSchemaCustomization = ({actions: {createTypes}}) => {

0 commit comments

Comments
 (0)