This is the 24th day of my participation in the August More Text Challenge
I wrote a lot about vUE in the previous article, which is a single page.
In this article we set up a VUE3 project.
We can actually modify it and we’ll see.
What is CLI?
The VUE CLI is a tool for setting up VUE projects.
There’s a lot of change between cli2 and cli3, and cli3 is no different from cli4, so let’s just say the difference between cli2 and cli4.
The big differences are:
- NPM installation command changes
- The generated directory structure is different from cli4 directory more concise
- Cli4 can choose whether to generate vue-router, vue-x, typescript, and SCSS when running NPM
- Webpack configuration in CLI4 requires adding files manually
vue.config.js
Vue CLI create application
First, open the terminal command
Install NPM and verify $NPM -v
Install vUE scaffolding tools – CLI:
$sudo NPM I -g@vue /cli
The second step is to create the application for vUE
$CD In the directory where the project is stored
$vue create Project name
(Install YARN. Otherwise, the intermediate process fails.)
You can customize the installation by selecting and deselecting it with Spaces
The third step is to select VUe3.0
The running effect is as follows:
Initializing the project takes a long time:
After a few seconds, the project is created like this:
Then it’s ready to run
$ cd hello01
$ yarn serve
The running effect is as follows, see the project.
conclusion
Vue3 projects are relatively easy to create.
Be careful to install the relevant tools, as mentioned above.
The rest depends on the network speed of the download.
That’s all for today.
I am meatball, learn a little knowledge every day. A front-end development hope to encourage more support, thank you