Merge pull request #792 from paulkaplan/fix-webpack-dev-server

Only uglify if building for production.
This commit is contained in:
Paul Kaplan 2017-11-17 12:32:41 -05:00 committed by GitHub
commit 8ce20fd308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -5,13 +5,14 @@ node_js:
env:
- NPM_SCRIPT="tap:unit -- --jobs=4"
- NPM_SCRIPT="tap:integration -- --jobs=4"
- NODE_ENV=production
sudo: false
cache:
directories:
- node_modules
install:
- npm install
- npm update
- npm --production=false install
- npm --production=false update
script: npm run $NPM_SCRIPT
jobs:
include:

View file

@ -20,12 +20,12 @@ const base = {
}
}]
},
plugins: [
plugins: process.env.NODE_ENV === 'production' ? [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true
})
]
] : []
};
module.exports = [