闭社主体 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.

21 lines
527 B

  1. const { join, resolve } = require('path');
  2. const { env, settings } = require('../configuration');
  3. module.exports = {
  4. test: /\.(js|jsx|mjs)$/,
  5. include: [
  6. settings.source_path,
  7. ...settings.resolved_paths,
  8. ].map(p => resolve(p)),
  9. exclude: /node_modules/,
  10. use: [
  11. {
  12. loader: 'babel-loader',
  13. options: {
  14. cacheDirectory: join(settings.cache_path, 'babel-loader'),
  15. cacheCompression: env.NODE_ENV === 'production',
  16. compact: env.NODE_ENV === 'production',
  17. },
  18. },
  19. ],
  20. };