umi+dva+antd新建项目

首先全局安装dva+umi
umi:npm install -g umi
dva:npm install -g dva-cli

通过脚手架创建项目

一:
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)

五:
? 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 @ 2019-08-12 10:39  蜗牛菜菜  阅读(3000)  评论(0编辑  收藏  举报
footer