问题:使用 create-react-app
创建 react
项目时,antd
的 css
样式无法正常显示。
解决方法:在 package.json
中添加如下代码
"babel": {
"presets": [
"react-app"
],
"plugins": [
[
"import",
{
"libraryName": "antd",
"style": "css"
}
]
]
}