babel.config.js 644 B

12345678910111213141516171819202122232425262728293031
  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-proposal-class-properties',
  9. // We need the bundler entry not the web one
  10. // Jest will otherwise resolve the wrong one
  11. [
  12. "module-resolver",
  13. {
  14. "alias": {
  15. "webdav$": "webdav/dist/node/index.js",
  16. },
  17. },
  18. ]
  19. ],
  20. presets: [
  21. // https://babeljs.io/docs/en/babel-preset-typescript
  22. '@babel/preset-typescript',
  23. [
  24. '@babel/preset-env',
  25. {
  26. useBuiltIns: false,
  27. modules: 'auto',
  28. },
  29. ],
  30. ],
  31. }