nodejs+npm+webpack+vue+ElementUI+vue-route

npm install npm -g

Taobao domestic npm mirror installation

npm install -g cnpm --registry=https://registry.npm.taobao.org
  • webpack installation, install the webpack module, -g represents global installation, remove it and ask the installation in the current directory
npm install webpack -g

Webpack itself can only deal with JavaScript modules, if you want to deal with other types of files, you need to use loader for conversion.
So if we need to add css files to the application, we need to use css-loader and style-loader, they do two different things, css-loader will iterate through CSS files, then find url() expressions and process them, The style-loader will insert the original CSS code into a style tag on the page.

cnpm install css-loader style-loader -g
  • vue installation
# 最新稳定版
$ npm install vue -g
  • elementUI
npm i element-ui -S

Guess you like

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