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
607 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: [
  7. /@babel(?:\/|\\{1,2})runtime/,
  8. /tesseract.js/,
  9. ],
  10. use: [
  11. {
  12. loader: 'babel-loader',
  13. options: {
  14. babelrc: false,
  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. };