Skip to content
Snippets Groups Projects
Commit da172a8b authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko
Browse files

Disable babel-loader cache when development environment (#4684)

parent cf615abb
No related branches found
No related tags found
No related merge requests found
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'),
},
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment