Create a Vue3 project using vue-cli

Create a Vue3 project using vue-cli

vue-cli official website:

https://cli.vuejs.org/zh/guide/creating-a-project.html#vue-create

Install vue-cli:

Node version requirements

Vue CLI 4.x requires Node.js v8.9 or higher (v10 or higher recommended). You can use n, nvm or nvm-windows to manage multiple Node versions on the same computer.
You can install this new package using any of the following commands:

npm install -g @vue/cli
# OR
yarn global add @vue/cli

Ensure that the vue cli version is above 4.5.0

vue --version

Create project

vue create my-project

Select the preset content, the last one represents manual configuration, select Manually select features and press Enter
Insert image description here
Select the features you need for your project, press the space to select, and press Enter after selecting Car
Insert image description here
Select vue version
Insert image description here
Use class-style component syntax and press Enter directly
Insert image description here
Select routing mode (enter both y and n Yes, y means history mode does not have a # sign, n means hash mode has a # sign)
Insert image description here
Select the css preprocessor and choose according to your needs
Insert image description here
Formatting and code The detection configuration, the default one will be fine
Insert image description here
Insert image description here
Where do you want the configuration to be placed?
Insert image description here
Whether to save the characteristics depends on your needsInsert image description here
Wait a moment, creation is successful!
Insert image description here
Click on the created file and you will see this:
Insert image description here

Guess you like

Origin blog.csdn.net/qq_58511059/article/details/129073621