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.

23 lines
576 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. plugins: [
  13. 'transform-react-remove-prop-types',
  14. ],
  15. cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'),
  16. cacheCompression: env.NODE_ENV === 'production',
  17. compact: false,
  18. sourceMaps: false,
  19. },
  20. },
  21. ],
  22. };