-
Notifications
You must be signed in to change notification settings - Fork 1
/
babel.config.js
64 lines (61 loc) · 1.29 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import fs from 'node:fs';
const runtimeVersion = JSON.parse(
fs.readFileSync(
new URL(import.meta.resolve('@babel/runtime/package.json')),
'utf8',
),
).version;
const config = {
targets: {},
assumptions: {
arrayLikeIsIterable: true,
constantReexports: true,
constantSuper: true,
enumerableModuleMeta: true,
ignoreFunctionLength: true,
ignoreToPrimitiveHint: true,
iterableIsArray: true,
mutableTemplateObject: true,
noClassCalls: true,
noDocumentAll: true,
noNewArrows: true,
objectRestNoSymbols: true,
privateFieldsAsProperties: true,
pureGetters: true,
setClassMethods: true,
setComputedProperties: true,
setPublicClassFields: true,
setSpreadProperties: true,
skipForOfIteratorClosing: true,
superIsCallableConstructor: true,
},
presets: [
[
'@babel/preset-env',
{
bugfixes: true,
modules: 'commonjs',
},
],
'@babel/preset-typescript',
],
plugins: [
[
'@babel/plugin-transform-runtime',
{
version: runtimeVersion,
},
],
'transform-inline-environment-variables',
[
'module-resolver',
{
alias: {
'@': './src',
},
},
],
'autocomplete-index',
],
};
export default config;