3 Ways to Create a Vue Single Page Application
First download the Vue CLI
Official link: https://cli.vuejs.org/zh/guide/installation.html
Install:
npm install -g @vue/cli
Check version:
vue --version
1. Command line creation (recommended)
vue create 项目名
After execution, many options will be selected, most of which are defaulted.
After the operation is complete, enter the following command to make the project run
npm run serve
The effect is as follows
2. Vue ui (not recommended)
Enter in the project folder
vue create 项目名
vue ui
After waiting for a long time. . . .
After the loading is complete, the page will pop up automatically, and we can operate the project on this page
3. Vite (popular in the future, not stable yet)
Enter the command under the project folder
npm init vite-app 项目名
cd 项目名
npm i
npm run dev
Wait for loading, and then enter the local link.
The effect is as follows