babel.config.json 912 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {
  2. "presets": [
  3. [
  4. "@babel/react",
  5. {
  6. "runtime": "automatic"
  7. }
  8. ],
  9. [
  10. "@babel/env",
  11. {
  12. "useBuiltIns": "usage",
  13. // This version must be aligned with the `core-js` version in `package.json`
  14. "corejs": { "version": 3.6 }
  15. }
  16. ]
  17. ],
  18. "plugins": ["angularjs-annotate", "macros"],
  19. // Target our current Node version in test environment, to transform and
  20. // polyfill only what's necessary
  21. "env": {
  22. "test": {
  23. "presets": [
  24. [
  25. "@babel/react",
  26. {
  27. "runtime": "automatic"
  28. }
  29. ],
  30. [
  31. "@babel/env",
  32. {
  33. "targets": { "node": "12.21" },
  34. "useBuiltIns": "usage",
  35. // This version must be aligned with the `core-js` version in `package.json`
  36. "corejs": { "version": 3.6 }
  37. }
  38. ]
  39. ]
  40. }
  41. }
  42. }