|
|
@ -1,5 +1,7 @@ |
|
|
|
const { resolve } = require('path'); |
|
|
|
const { resolve } = require('path'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const env = process.env.NODE_ENV || 'development'; |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
test: /\.js$/, |
|
|
|
test: /\.js$/, |
|
|
|
// include react-intl because transform-react-remove-prop-types needs to apply to it
|
|
|
|
// include react-intl because transform-react-remove-prop-types needs to apply to it
|
|
|
@ -9,7 +11,7 @@ module.exports = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
loader: 'babel-loader', |
|
|
|
loader: 'babel-loader', |
|
|
|
options: { |
|
|
|
options: { |
|
|
|
forceEnv: process.env.NODE_ENV || 'development', |
|
|
|
forceEnv: env, |
|
|
|
cacheDirectory: resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'), |
|
|
|
cacheDirectory: env === 'development' ? false : resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|