React-shop-dome
项目初始化
1、react脚手架
create-react-app react-shop-dome
删除多于文件src留下App.js以及index.js,并把对应引入删掉
2、引入antd和antd-mobile
1.下载依赖包
npm install antd antd-mobile -S
2.实现按需加载
npm install babel-plugin-import react-app-rewired customize-cra --dev
修改package.json
"scripts": {
- "start": "react-scripts start",
+ "start": "react-app-rewired start",
- "build": "react-scripts build",
+ "build":
1