vue scaffolding to create webpack project

Prerequisites: You can use npm commands normally with node installed, and install the vue-cli (scaffolding) tool globally.

Initialize a new webpack based project with vue

 

One: vue init webpack my-project (my-project is the project name and cannot contain uppercase)

  Note: In creating the project, it will be designed whether to install Eslint (which can be used to detect syntax), and I mostly choose not to install it.

 

Two: cd my-project (Switch to the new project.)

 

Three: npm install (download the module package, or use cnpm install [recommended].)

  Note: Install Taobao mirror:npm install -g cnpm --registry=https://registry.npm.taobao.org

 

Four: npm run dev (running the project) succeeded!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325891751&siteId=291194637