/
babel.config.cjs
54 lines (52 loc) · 1.71 KB
/
babel.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module.exports = {
presets: [
[
// Mehr: https://babeljs.io/docs/en/babel-preset-env
'@babel/preset-env', {
targets: {
// [ 2023 09 12 ] - Es scheint noch probleme mit webapp/lib/utils/md5... zu geben
// When specifying this option, the browsers field will be ignored.
// "esmodules": true,
// "browsers": [
// "last 2 Chrome versions",
// "last 1 Safari versions",
// "last 1 Firefox versions"
// ],
node: 'current',
},
// Enable transformation of ES6 module syntax to another module type.
// Setting this to false will not transform modules.
modules: 'auto'
},
'@babel/preset-typescript'
],
'@babel/typescript'
],
plugins: [
// yarn add -D @babel/plugin-transform-runtime babel-plugin-transform-inline-environment-variables
'@babel/plugin-transform-runtime',
[
'transform-inline-environment-variables',
{
include: ['NODE_ENV', 'REQUIRE_TARGET']
}
]
],
env: {
// BABEL_ENV=node <command (e.g. yarn test:unit)>
node: {
presets: [
[
'@babel/preset-env',
{
targets: {
esmodules: true,
node: 'current'
},
modules: 'auto'
}
]
]
}
}
}