forked from alteryx/dev-harness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.babelrc.js
34 lines (33 loc) · 849 Bytes
/
.babelrc.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
module.exports = {
presets: [
'@babel/preset-react',
'@babel/preset-typescript',
[
'@babel/preset-env',
{
corejs: 3,
targets: {
browsers: ['>0.25%', 'not dead', 'not ie 11', 'not op_mini all']
}
}
]
],
env: {
production: {
ignore: ['**/*.test.*', '**/__test__', '**/__mocks__']
}
},
plugins: [
['@babel/plugin-syntax-dynamic-import'],
['@babel/transform-runtime'],
["transform-imports", {
"@alteryx/icons\/?(((\\w*)?\/?)*)": {
"transform": importName => {
const splitName = importName.split(/(?=[A-Z])/)
const folderName = splitName !== null ? splitName.join('-').toLocaleLowerCase() : importName.toLocaleLowerCase();
return `@alteryx/icons/icons/${folderName}`;
}
},
}],
],
};