From fae71b653a7481a5f06d071e74d4a9e4b7f9952a Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Fri, 4 Aug 2017 00:46:49 +0900 Subject: [PATCH] Enable cache for babel-loader (#4505) --- .travis.yml | 1 + config/webpack/loaders/babel.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4d4dc089306..d5b51fcb0c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ cache: - node_modules - public/assets - public/packs-test + - tmp/cache/babel-loader dist: trusty sudo: required diff --git a/config/webpack/loaders/babel.js b/config/webpack/loaders/babel.js index a1992a450a9..3177d964ac9 100644 --- a/config/webpack/loaders/babel.js +++ b/config/webpack/loaders/babel.js @@ -1,3 +1,5 @@ +const { resolve } = require('path'); + module.exports = { test: /\.js$/, // include react-intl because transform-react-remove-prop-types needs to apply to it @@ -8,5 +10,6 @@ module.exports = { loader: 'babel-loader', options: { forceEnv: process.env.NODE_ENV || 'development', + cacheDirectory: resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'), }, };