From 26771e9e0c9ccc7bc984686a6a6895a44543a95d Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Fri, 17 Nov 2017 09:59:09 -0500 Subject: [PATCH 1/3] Only uglify if building for production. Uglify was trying to run always, including the dev-server output, which included es6 that broke uglifier. --- webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = [ From a036564a600c63cb9dd4282487a331a0ffb67275 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Fri, 17 Nov 2017 10:06:38 -0500 Subject: [PATCH 2/3] Add node env to travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 955aa5bae..e1a2e3b8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ node_js: env: - NPM_SCRIPT="tap:unit -- --jobs=4" - NPM_SCRIPT="tap:integration -- --jobs=4" + - NODE_ENV=production sudo: false cache: directories: From d83f32c578b2c9168d750af5e1cd48394d4214d0 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Fri, 17 Nov 2017 11:48:22 -0500 Subject: [PATCH 3/3] Use production=false in install step --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e1a2e3b8e..4f98c1364 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,8 @@ cache: directories: - node_modules install: -- npm install -- npm update +- npm --production=false install +- npm --production=false update script: npm run $NPM_SCRIPT jobs: include: