superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: [ci] take #2, improve build times by saving TerserPlugin cache (#6882)
Date Fri, 15 Feb 2019 16:53:18 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 4986874  [ci] take #2, improve build times by saving TerserPlugin cache (#6882)
4986874 is described below

commit 49868748e693e48184ccfd52c64fe5e4c8d28edb
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Fri Feb 15 08:53:06 2019 -0800

    [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 48bc61e..b5af9b8 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 2c021a6..d7068ba 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 4c587c8..97a51de 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,
     }),


Mime
View raw message