umi+dva+antd新建项目(亲测可用)

首先全局安装dva+umi

umi:npm install -g umi
dva:npm install -g dva-cli

判断umi是否可以用。

umi -v

通过脚手架创建项目

一:
mkdir myapp && cd myapp
二:
npm create umi
三:
? Select the boilerplate type (Use arrow keys)
  ant-design-pro  - Create project with an layout-only ant-design-pro boilerplate, use together with umi block.
❯ app             - Create project with a simple boilerplate, support typescript.
  block           - Create a umi block.
  library         - Create a library with umi.
  plugin          - Create a umi plugin.
四:
? Do you want to use typescript? (y/N) N
五:
? What functionality do you want to enable? (Press <space> to select, <a> to toggle all, <i> to invert selection)
❯◯ antd
 ◯ dva
 ◯ code splitting
 ◯ dll

地五步的时候选择antd和dva即可 

参考umi官网文档(https://umijs.org/zh/guide/create-umi-app.html#%E4%BB%8B%E7%BB%8D-create-umi)

具体用法可以查看官方文档

posted on 2019-11-26 14:51  漫思  阅读(2545)  评论(0编辑  收藏  举报

导航