babel.config.js 690 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: AGPL-3.0-or-later
  4. */
  5. module.exports = {
  6. plugins: [
  7. '@babel/plugin-syntax-dynamic-import',
  8. '@babel/plugin-transform-class-properties',
  9. '@babel/plugin-transform-private-methods',
  10. // We need the bundler entry not the web one
  11. // Jest will otherwise resolve the wrong one
  12. [
  13. "module-resolver",
  14. {
  15. "alias": {
  16. "webdav$": "webdav/dist/node/index.js",
  17. },
  18. },
  19. ]
  20. ],
  21. presets: [
  22. // https://babeljs.io/docs/en/babel-preset-typescript
  23. '@babel/preset-typescript',
  24. [
  25. '@babel/preset-env',
  26. {
  27. useBuiltIns: false,
  28. modules: 'auto',
  29. },
  30. ],
  31. ],
  32. }