You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
409 B

  1. const { resolve } = require('path');
  2. const env = process.env.NODE_ENV || 'development';
  3. module.exports = {
  4. test: /\.js$/,
  5. exclude: /node_modules/,
  6. loader: 'babel-loader',
  7. options: {
  8. forceEnv: process.env.NODE_ENV || 'development',
  9. sourceRoot: 'app/javascript',
  10. cacheDirectory: env === 'development' ? false : resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'),
  11. },
  12. };