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.

26 lines
652 B

  1. const { join } = require('path');
  2. const { settings, env } = require('../configuration');
  3. module.exports = {
  4. test: /\.(js|mjs)$/,
  5. include: /node_modules/,
  6. exclude: /@babel(?:\/|\\{1,2})runtime/,
  7. use: [
  8. {
  9. loader: 'babel-loader',
  10. options: {
  11. babelrc: false,
  12. presets: [
  13. ['@babel/env', { modules: false }],
  14. ],
  15. plugins: [
  16. 'transform-react-remove-prop-types',
  17. ],
  18. cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'),
  19. cacheCompression: env.NODE_ENV === 'production',
  20. compact: false,
  21. sourceMaps: false,
  22. },
  23. },
  24. ],
  25. };