-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbabel.config.js
42 lines (42 loc) · 1002 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
38
39
40
41
42
module.exports = {
presets: [
'@babel/react',
[
'@babel/env',
{
targets: {
browsers: [
'last 5 Chrome versions',
'last 3 Firefox versions',
'safari >= 9',
'edge >= 15',
],
},
},
],
'@babel/typescript',
],
plugins: [
'@babel/transform-react-display-name',
['@babel/plugin-proposal-decorators', { version: '2023-11' }],
[
'module-resolver',
{
root: ['./src', './node_modules/fomantic-ui-css'],
alias: {
'fomantic-ui': 'fomantic-ui-css',
},
},
],
[
'transform-replace-expressions',
{
replace: {
// Semantic UI refuses to open modals in test environment because of missing CSS transitions
// https://github.com/Semantic-Org/Semantic-UI/issues/3040#issuecomment-232049534
'module.can.animate()': 'module.can.animate()||true',
},
},
],
],
};