Use vue-cli3 to build a vue project and install the basic dependencies that will be used in the work

1. Open the folder where the project needs to be created

2. Open the command line tool in this folder (one of the ways is as follows:)

Before creating a project, be sure to check the scaffolding version used (this construction project is only applicable to vue-cli3 at most)

Use commands: ①npm uninstall -g @vue/cli ②npm install -g @vue/[email protected] ③vue -V

3. Use npm create project name (npm create new-package)

4. Complete the project creation according to the vue-cli prompts and your own needs

5. Use the development tool to open the project (this project uses vscode as shown below:)

6. Install the style auxiliary dependency tool sass (sass-loader; node-sass; style-loader)

①npm install sass-loader node-sass style-loader --save --dev (version needs to be controlled, try not to install it in one piece)

②npm install (to ensure that some dependencies are not fully installed due to network or other reasons)

7. Install element-ui

①npm i element-ui -S

②Introduce two lines of code in main.js (as shown below:)

import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css';

 

Guess you like

Origin blog.csdn.net/weixin_44191318/article/details/123259906