Last active
August 21, 2018 21:07
-
-
Save siakaramalegos/b5e3b1bbdd87f5f8bba193fc26169a4c to your computer and use it in GitHub Desktop.
Disable source maps in production build using Gatsby v2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.onCreateWebpackConfig = ({ actions, stage }) => { | |
// If production JavaScript and CSS build | |
if (stage === 'build-javascript') { | |
// Turn off source maps | |
actions.setWebpackConfig({ | |
devtool: false, | |
}) | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment