babel.config.json 989 B

123456789101112131415161718192021222324252627282930
  1. {
  2. "presets": [
  3. [
  4. "@babel/env",
  5. {
  6. "useBuiltIns": "usage",
  7. // This version must be aligned with the `core-js` version in `package.json`
  8. "corejs": { "version": "3.30" },
  9. "exclude": [
  10. // Exclude Array.prototype.push polyfill, as it's not needed and affects performance in Chrome
  11. "es.array.push",
  12. // Exclude objectSpread polyfill, as it's not needed and affects performance
  13. "@babel/plugin-transform-object-rest-spread",
  14. // Exclude _defineProperty polyfill, as it causes a bug without the objectSpread polyfill
  15. "@babel/plugin-transform-computed-properties"
  16. ]
  17. }
  18. ],
  19. ["@babel/react", { "runtime": "automatic" }],
  20. "@babel/typescript"
  21. ],
  22. "plugins": ["angularjs-annotate", "macros"],
  23. "overrides": [
  24. // treat .cjs files (e.g. libraries symlinked into node_modules) as commonjs
  25. {
  26. "test": "../../**/*.cjs",
  27. "sourceType": "script"
  28. }
  29. ]
  30. }