Start the vue project with idea

Time:2022-8-5

1. Configure the vue plugin in the idea

 

 

Second, build the node.js environment

After installing node.js successfully, enter node -v to see if the installation is successful

 

3. Install cnpm

Enter npm install -g cnpm –registry=http://registry.npm.taobao.org on the command line and wait for the installation. After the installation is complete, we can use cnpm instead of npm to install dependencies

 

Fourth, install the vue-cli scaffolding build tool

Run the command cnpm install -g vue-cli on the command line, and then wait for the installation to complete. Through the above three steps, our environment and tools are ready, and then we will start using vue-cli to build the project

 

5. Build and run the project

cd to the project directory

Then you need to enter the command: vue init webpack frontend (the command here means to initialize a project, the project name is frontend, where webpack is a build tool, that is, the entire project is based on webpack) When running the command initialization, the user will be asked to enter several basic options,

Such as project name, description, author and other information, you can directly press Enter and default.

 

Six, installation project dependent resources

cd to the project directory, then enter cnpm install to wait for the installation, warning messages will appear during the installation, and some errors such as stack overflow will appear. I encountered it here. Generally, the first installation is fine. If you have installed it, you can uninstalled and reinstalled

 

7. Running the project

Running the command npm run dev will run our application in hot-loading mode. Hot-loading allows us to modify the code without manually refreshing it, and the browser can see the modified effect in real time.

 

Click edit configurations in the idea and add an npm

 

Recommended Today

[What is Istio? ] If you don't know, you're out, a 40-minute text can be quickly understood

@[toc] foreword This article is purely theoretical and contains the following content, read it as needed: Istio concepts, service mesh, traffic management, istio architecture (Envoy, Sidecar, Istiod) Virtual Service (VirtualService), Routing Rules, Destination Rules (DestinationRule) Gateway, network resiliency and testing (timeouts, retries, circuit breakers, fault injection) What is Istio? Istio is an open sourceservice mesh, […]