Prerequisites for building:
node environment
- Node is installed by a fool, go directly to the official website to download and install the next step
- Enter node -v on the command line to query the version number. If there is a version number, the installation is successful.
- Node comes with npm package management tool (you can also enter npm -v to view the version number after installing node)
- Npm is too slow, download the domestic Taobao mirror cnpm (npm install -g cnpm --registry= https://registry.npm.taobao.org )
Install webpack
- Run npm install webpack -g
Install vue-cli 2.x
- npm install vue-cli -g
- Create a project: vue init webpack project name (do not take the Chinese name)
- Start: npm run dev
Install vue-cli 3.x
- npm install @vue/cli -g
- Create a project: vue create project name (do not take the Chinese name)
- Start: npm run serve
- Enter vue ui in the cmd console to open the interface management