闭社主体 forked from https://github.com/tootsuite/mastodon
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.

17 lines
493 B

  1. const { resolve } = require('path');
  2. const env = process.env.NODE_ENV || 'development';
  3. module.exports = {
  4. test: /\.js$/,
  5. // include react-intl because transform-react-remove-prop-types needs to apply to it
  6. exclude: {
  7. test: /node_modules/,
  8. exclude: /react-intl[\/\\](?!locale-data)/,
  9. },
  10. loader: 'babel-loader',
  11. options: {
  12. forceEnv: env,
  13. cacheDirectory: env === 'development' ? false : resolve(__dirname, '..', '..', '..', 'tmp', 'cache', 'babel-loader'),
  14. },
  15. };