-
Notifications
You must be signed in to change notification settings - Fork 117
/
babel.config.js
37 lines (37 loc) · 941 Bytes
/
babel.config.js
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
module.exports = {
plugins: [
['transform-inline-environment-variables'],
],
env: {
// Environment for transpiling files to be compatible with UMD.
dist: {
presets: [
['@babel/preset-env', {
modules: false,
useBuiltIns: 'usage',
corejs: '3.23',
}]
],
plugins: [
['@babel/plugin-transform-runtime', {
corejs: false,
helpers: false,
regenerator: false,
useESModules: false,
version: '^7.18.9',
}],
['@babel/plugin-transform-modules-commonjs', { loose: true }]
]
},
// Environment for transpiling files to be compatible with CommonJS.
commonjs: {
plugins: [
['@babel/plugin-transform-modules-commonjs', { loose: true }],
],
},
// Environment for transpiling files to be compatible with ES Modules.
es: {
plugins: [],
},
},
};