VSCode builds Vue project

1. Install vscode and nodejs

2. Install vue-cli globally, vue-cli can help us quickly build Vue projects

npm install -g vue-cli

3. Install webpack, which is a tool for packaging js

npm install -g webpack

4. After the installation is complete, you can start to create a vue project. First, create a folder to store your project, open the corresponding folder with vscode, and cd to the corresponding folder in the terminal. For example, my folder is myvue

vue init webpack myvue

There may be problems here. It will report connect ETIMEDOUT. Refer to this article here Vue installation error

But I failed to solve the problem according to this. In the end, it was solved by adding --offline to the command to indicate offline initialization.

5. Then run the project, first cd to the project folder, cd myvue, and then enter the following command

npm run dev

After success, enter: http://localhost:8080 in the browser and see the following screen is successful.


 

 

Guess you like

Origin blog.csdn.net/liujibin1836591303/article/details/120880236