上官网🔗
准备工作
import { Button } from 'antd';
import 'antd/dist/antd.css'
function App() {
return (
<div>
<Button type='primary'>开始</Button>
</div>
);
}
export default App;
1.安装craco
yarn add @craco/craco
2.修改 package.json 里的 scripts 属性
/* package.json */
"scripts": {
- "start": "react-scripts start",
- "build": "react-scripts build",
- "test": "react-scripts test",
+ "start": "craco start",
+ "buil