- 扩展项目(需要创建git默认文件)
具体步骤如下:
a.git init
b.git add .
c.git commit -m "..." -
npm install babel-plugin-import --save-dev
-
npm install antd -s
-
npm run eject
- 在package.json文件中找到babel,修改成如下格式即可
"babel": { "presets": [ "react-app" ], "plugins": [ [ "import", { "libraryName": "antd", "style": "css" } ] ] },
原文地址:https://www.cnblogs.com/nailc/p/11087421.html
时间: 2024-11-01 10:57:21