skyline-console/.babelrc
4a143fc497 chore: import lodash on demand
add babel-plugin-lodash package to import lodash on demand and reduce bundle size

Change-Id: I9b64997bb3f232c9d7bd96cb0d5586b7e2733414
2022-08-04 18:05:06 +08:00

67 lines
1.2 KiB
Plaintext

{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"esmodules": true
}
}
],
"@babel/preset-react"
],
"plugins": [
["lodash"],
[
"@babel/plugin-transform-runtime",
{
"corejs": {
"version": 3,
"proposals": true
}
}
],
"@babel/plugin-transform-modules-commonjs",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
[
"import",
{
"libraryName": "antd",
"libraryDirectory": "lib",
"style": true
},
"antd"
],
[
"import",
{
"libraryName": "@ant-design/icons",
"libraryDirectory": "lib/icons",
"camel2DashComponentName": false
},
"@ant-design/icons"
]
],
"env": {
"test": {
"plugins": [
[
"istanbul",
{
"useInlineSourceMaps": false
}
]
]
}
}
}