about summary refs log tree commit diff
path: root/config/webpack
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-08-25 02:27:52 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-24 19:27:52 +0200
commitda172a8b1b24a19a3838d3e59f453d1b17a2a4aa (patch)
tree475d661360c21491733488b67d1e3a162083c577 /config/webpack
parentcf615abbf9323f3b73681306090de48f9e13a6b9 (diff)
Disable babel-loader cache when development environment (#4684)
Diffstat (limited to 'config/webpack')
-rw-r--r--config/webpack/loaders/babel.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/webpack/loaders/babel.js b/config/webpack/loaders/babel.js
index 3177d964a..1416191c0 100644
--- a/config/webpack/loaders/babel.js
+++ b/config/webpack/loaders/babel.js
@@ -1,5 +1,7 @@
 const { resolve } = require('path');
 
+const env = process.env.NODE_ENV || 'development';
+
 module.exports = {
   test: /\.js$/,
   // include react-intl because transform-react-remove-prop-types needs to apply to it
@@ -9,7 +11,7 @@ module.exports = {
   },
   loader: 'babel-loader',
   options: {
-    forceEnv: process.env.NODE_ENV || 'development',
-    cacheDirectory: resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'),
+    forceEnv: env,
+    cacheDirectory: env === 'development' ? false : resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'),
   },
 };