Skip to content

Commit

Permalink
fix(webpack): remove source maps from production build (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwambach authored Sep 18, 2019
1 parent 63db92f commit 76984c5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ module.exports = (env, {mode} = {}) => {
const isProduction = mode === 'production';
return {
entry: './src/scripts/index.tsx',
devtool: 'inline-source-map',
devtool: isProduction ? undefined : 'inline-source-map',
optimization: {
minimizer: [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin({})]
minimizer: [
new TerserJSPlugin({extractComments: false}),
new OptimizeCSSAssetsPlugin({})
]
},
module: {
rules: [
Expand Down

0 comments on commit 76984c5

Please sign in to comment.