babel.config.json 966 B

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