about summary refs log tree commit diff
path: root/config/webpack/loaders
diff options
context:
space:
mode:
Diffstat (limited to 'config/webpack/loaders')
-rw-r--r--config/webpack/loaders/babel.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/webpack/loaders/babel.js b/config/webpack/loaders/babel.js
index 05ef8431c..989a87dcf 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
@@ -11,6 +13,6 @@ module.exports = {
   options: {
     forceEnv: process.env.NODE_ENV || 'development',
     sourceRoot: 'app/javascript',
-    cacheDirectory: resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'),
+    cacheDirectory: env === 'development' ? false : resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'),
   },
 };