Skip to content

Commit

Permalink
[ci] take #2, improve build times by saving TerserPlugin cache (apach…
Browse files Browse the repository at this point in the history
…e#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`
  • Loading branch information
mistercrunch authored Feb 15, 2019
1 parent ec6657a commit 4986874
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ celerybeat.pid
geckodriver.log
ghostdriver.log
testCSV.csv
.terser-plugin-cache/
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ cache:
- ~/.npm
- ~/.cache
- ~/.travis_cache/
- superset/assets/node_modules/.cache/terser-webpack-plugin/
- superset/assets/.terser-plugin-cache/
2 changes: 1 addition & 1 deletion superset/assets/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const config = {
if (!isDevMode) {
config.optimization.minimizer = [
new TerserPlugin({
cache: true,
cache: '.terser-plugin-cache/',
parallel: true,
extractComments: true,
}),
Expand Down

0 comments on commit 4986874

Please sign in to comment.