Install Node.js and NPM
NPM is similar to apt in Linux, which downloads and installs various libraries.
Download the latest Node.js(Window64) from the node.js website.
nodejs.org/zh-cn/
After the installation is complete, run the following command to check whether the installation is successful.
\Users\jaysh>node -v v14.17.0 C:\Users\jaysh> NPM -v 6.14.13Copy the code
Install CNPM, Webpack and VUE-CLI
First install NPM ali image, native NPM download dependency package is too slow, image can improve download efficiency. npm i -g cnpm –registry=https://registry.npm.taobao.org
Secondly, since vue-CLI is based on Webpack, we need to install webpack first, command line input:
npm install webpack -g
Then install vuE-CLI scaffolding
cnpm install vue-cli -g
Check whether the VUE is installed successfully
vue- V
Create a VUE project
vue init webpack vue-demo
This command will create a vue-demo project in the current directory.
Run the VUE project
cd vue-demo
npm run dev
Copy the code
After startup, visit localhost:8080 to see
Vue. Js is configured in IDEA
File -> Settings -> Plugins: search for vue.js and install vue.js. Note that it prompts you to restart the IDE after installation
File -> Settings -> Editor -> File Types, add the vue suffix to the HTML options.
File -> Settings -> Languages&Frameworks -> JavaScript: Change the JavaScript language version to ECMAScript 6
The configuration is complete.