nextcloud/babel.config.js
Ferdinand Thiessen 8fc828e0e2
fix(files): Adjust babel module resolution
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-06-11 15:45:22 +02:00

32 lines
644 B
JavaScript

/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
module.exports = {
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
// We need the bundler entry not the web one
// Jest will otherwise resolve the wrong one
[
"module-resolver",
{
"alias": {
"webdav$": "webdav/dist/node/index.js",
},
},
]
],
presets: [
// https://babeljs.io/docs/en/babel-preset-typescript
'@babel/preset-typescript',
[
'@babel/preset-env',
{
useBuiltIns: false,
modules: 'auto',
},
],
],
}