"babel": {
"presets": [
"react-app"
],
"plugins": [
"import",
{
"libraryName": "antd",
"style": true
}
]
},
原配置如上会报错.libraryName is not a valid Plugin property
google了一下发现在plugins中再套一层[]即可
"babel": {
"presets": [
"react-app"
],
"plugins": [
[
"import",
{
"libraryName": "antd",
"style": true
}
]
]
},