Removed source-maps from production builds

This commit is contained in:
JubbeArt 2018-07-28 23:46:19 +02:00
parent 4727d6961c
commit f6ab190081
2 changed files with 4 additions and 5 deletions

View file

@ -24,8 +24,7 @@
},
"scripts": {
"start": "webpack-dev-server --mode development",
"build-dev": "webpack --mode development",
"build-prod": "webpack --mode production",
"build": "webpack --mode production",
"build-sass": "node-sass --style compressed src/sass/index.sass dist/main.css"
},
"dependencies": {

View file

@ -1,6 +1,6 @@
const path = require('path')
module.exports = {
module.exports = (env, argv) => ({
entry: [
'babel-polyfill',
'whatwg-fetch',
@ -10,7 +10,7 @@ module.exports = {
contentBase: path.resolve(__dirname, 'dist'),
historyApiFallback: true
},
devtool: 'cheap-module-eval-source-map',
devtool: argv.mode !== 'production' ? 'cheap-module-eval-source-map' : false,
module: {
rules: [
{
@ -20,4 +20,4 @@ module.exports = {
}
]
}
}
})