Umi 4 quick build project

Umi4 was released in June this year. It supports both Vite and Webpack construction methods, optimizes the long-criticized mufs, and also supports vue. So let's get started building it.

1. First find a place to create an empty directory

2. Create a project

It can be installed through pnpm, npm, yarn. The official recommendation is pnpm, and the domestic installation speed is faster. The commands of the three are different, but the end result is the same. Here I choose yarn.

 

3. Select project template

 1.Simple App 

You can understand it as a pure version of Umi, which includes all the functions under Guides in the umi4 document, but does not include Umi Max.

2.Ant Design Pro

Contains the complete functions of Umi Max, which can be configured through pluggable configuration in .umirc.ts or config/config.ts. I personally recommend this template.

 3.Vue Simple App

Use this template if your project framework is vue.

 4. Select the package manager of the client

5. Select resource registration place

Domestic recommendation choose taobao

 

6. Start the project

After waiting for a few minutes, the installation of the project can be completed, and the project can be started directly by yarn dev.

 7. Others

 Umi4 has a built-in generator, and some content can be produced with one click. The specific functions can be viewed and generated through the umi g command.

 

Guess you like

Origin blog.csdn.net/qq_38629292/article/details/126131737