babel.config.js 479 B

123456789101112131415161718192021222324252627282930
  1. const exclude = [
  2. '@babel/plugin-transform-async-to-generator',
  3. '@babel/plugin-transform-regenerator',
  4. '@babel/plugin-transform-typeof-symbol',
  5. ];
  6. module.exports = {
  7. presets: [
  8. [
  9. '@babel/preset-env', {
  10. loose: true,
  11. modules: false,
  12. exclude,
  13. },
  14. ],
  15. ],
  16. env: {
  17. test: {
  18. presets: [
  19. [
  20. '@babel/preset-env', {
  21. loose: true,
  22. exclude,
  23. },
  24. ],
  25. ],
  26. },
  27. },
  28. };