美文网首页
记录 react + antd 使用过程中 css 引入问题

记录 react + antd 使用过程中 css 引入问题

作者: direwolf_ | 来源:发表于2019-03-14 10:07 被阅读0次

问题:使用 create-react-app 创建 react 项目时,antdcss 样式无法正常显示。
解决方法:在 package.json 中添加如下代码

"babel": {
    "presets": [
      "react-app"
    ],
    "plugins": [
      [
        "import",
        {
          "libraryName": "antd",
          "style": "css"
        }
      ]
    ]
  }

相关文章

网友评论

      本文标题:记录 react + antd 使用过程中 css 引入问题

      本文链接:https://www.haomeiwen.com/subject/pggfmqtx.html