diff --git a/.travis.yml b/.travis.yml index 955aa5bae..4f98c1364 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/webpack.config.js b/webpack.config.js index b58666d47..7166587fc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,12 +20,12 @@ const base = { } }] }, - plugins: [ + plugins: process.env.NODE_ENV === 'production' ? [ new webpack.optimize.UglifyJsPlugin({ include: /\.min\.js$/, minimize: true }) - ] + ] : [] }; module.exports = [