forked from WPMedia/arc-themes-blocks
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbabel.config.js
39 lines (39 loc) · 1.14 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
module.exports = {
ignore: [
'./dist',
],
plugins: [
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
],
presets: [
['@babel/preset-env', { targets: 'defaults' }],
'@babel/preset-react'],
env: {
test: {
plugins: [
'@babel/plugin-proposal-nullish-coalescing-operator',
'transform-react-remove-prop-types',
[
'@babel/plugin-proposal-decorators',
{
legacy: true,
},
],
'@babel/plugin-proposal-class-properties',
['module-resolver', {
alias: {
'fusion:themes': './jest/mocks/themes.js',
'fusion:content': './jest/mocks/content.js',
'fusion:context': './jest/mocks/context.js',
'fusion:consumer': './jest/mocks/consumer.js',
'fusion:environment': './jest/mocks/environment.js',
'fusion:properties': './jest/mocks/properties.js',
'fusion:static': './jest/mocks/static.js',
'fusion:intl': './jest/mocks/intl.js',
},
}],
],
},
},
};