[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`
This commit is contained in:
Maxime Beauchemin 2019-02-15 08:53:06 -08:00 committed by GitHub
parent ec6657ab2d
commit 49868748e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@ -77,3 +77,4 @@ celerybeat.pid
geckodriver.log
ghostdriver.log
testCSV.csv
.terser-plugin-cache/

View File

@ -95,4 +95,4 @@ cache:
- ~/.npm
- ~/.cache
- ~/.travis_cache/
- superset/assets/node_modules/.cache/terser-webpack-plugin/
- superset/assets/.terser-plugin-cache/

View File

@ -270,7 +270,7 @@ const config = {
if (!isDevMode) {
config.optimization.minimizer = [
new TerserPlugin({
cache: true,
cache: '.terser-plugin-cache/',
parallel: true,
extractComments: true,
}),