From 49868748e693e48184ccfd52c64fe5e4c8d28edb Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 15 Feb 2019 08:53:06 -0800 Subject: [PATCH] [ci] take #2, improve build times by saving TerserPlugin cache (#6882) The problem with the previous solution was that the `npm ci` command nuke the `node_modules` folder, including the `.cache` that was used by default. By moving the cache out of `node_modules` we get to both run `npm ci` and accelerate `TerserPlugin` --- .gitignore | 1 + .travis.yml | 2 +- superset/assets/webpack.config.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 48bc61edffb..b5af9b81bef 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,4 @@ celerybeat.pid geckodriver.log ghostdriver.log testCSV.csv +.terser-plugin-cache/ diff --git a/.travis.yml b/.travis.yml index 2c021a63366..d7068ba1976 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,4 +95,4 @@ cache: - ~/.npm - ~/.cache - ~/.travis_cache/ - - superset/assets/node_modules/.cache/terser-webpack-plugin/ + - superset/assets/.terser-plugin-cache/ diff --git a/superset/assets/webpack.config.js b/superset/assets/webpack.config.js index 4c587c8b495..97a51de8130 100644 --- a/superset/assets/webpack.config.js +++ b/superset/assets/webpack.config.js @@ -270,7 +270,7 @@ const config = { if (!isDevMode) { config.optimization.minimizer = [ new TerserPlugin({ - cache: true, + cache: '.terser-plugin-cache/', parallel: true, extractComments: true, }),