-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
31 lines (31 loc) · 1.03 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
/** @type {import('@babel/core/src/config/files').ConfigFile} */
module.exports = {
presets: [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: {
version: '3.21',
proposals: true,
},
shippedProposals: true,
targets: {
node: 'current',
browsers: '> 0.25%, not dead',
},
bugfixes: true,
},
],
[
'@babel/preset-typescript',
{
allowDeclareFields: true, // sets class fields with only types to `undefined`, e.g. `class X { val: string; }; {...new X()} => { val: undefined }`
// onlyRemoveTypeImports: true, // removes all `import/export type {...}` lines. This is done by default in tsconfig, but if issues exist in Babel, uncomment this
},
],
],
plugins: [
'@babel/plugin-transform-runtime',
],
};