1、命令添加vux
npm install vux --save
2、在build/webpack.base.conf.js中配置
const vuxLoader = require('vux-loader')
const webpackConfig = originalConfig // 原来的 module.exports 代码赋值给变量 webpackConfig
//即将原来的module.exports 改为 const webpackConfig
module.exports = vuxLoader.merge(webpackConfig, {
plugins: [{
name: 'vux-ui'
}]
})
3、添加less
npm install less less-loader --save-dev
4、添加yaml-loader
npm install yaml-loader --save-dev
5、添加vux-loader
npm install vux-loader --save-dev
6、在main.js中添加
const FastClick = require('fastclick')
FastClick.attach(document.body)
import VueRouter from 'vue-router'
Vue.use(VueRouter)