-
Notifications
You must be signed in to change notification settings - Fork 203
/
babel.config.mjs
42 lines (41 loc) · 985 Bytes
/
babel.config.mjs
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
// See https://babeljs.io/docs/en/configuration
export default {
/**
* @see https://babeljs.io/docs/options#targets
* default is es5
*/
// targets: '',
assumptions: {
privateFieldsAsProperties: true,
setPublicClassFields: true,
},
presets: [
[
'@babel/preset-env',
{
// Exclude transforms that make all code slower
exclude: ['transform-typeof-symbol'],
},
],
'@babel/preset-typescript',
'@babel/preset-react',
],
plugins: [
[
'@babel/plugin-transform-typescript',
{
allowDeclareFields: true,
},
],
// https://babeljs.io/docs/en/babel-plugin-transform-runtime
[
'@babel/plugin-transform-runtime',
{
// By default, babel assumes babel/runtime version 7.0.0-beta.0,
// explicitly resolving to match the provided helper functions.
// https://github.com/babel/babel/issues/10261
version: '7.25.6',
},
],
],
};