-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbabel.config.js
More file actions
34 lines (33 loc) · 781 Bytes
/
Copy pathbabel.config.js
File metadata and controls
34 lines (33 loc) · 781 Bytes
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
module.exports = {
presets: [
['@babel/preset-env', {
targets: {
node: 'current',
esmodules: true
},
modules: 'auto'
}],
['@babel/preset-react', {
runtime: 'automatic'
}]
],
plugins: [
// Transform dynamic imports for testing
'babel-plugin-dynamic-import-node',
// Support for class properties
'@babel/plugin-proposal-class-properties',
// Support for private methods
'@babel/plugin-proposal-private-methods',
// Support for optional chaining
'@babel/plugin-proposal-optional-chaining'
],
env: {
test: {
// Special settings for Jest environment
plugins: [
'babel-plugin-transform-import-meta',
'babel-plugin-transform-react-jsx'
]
}
}
};