Closed wengcd closed 7 years ago
在webpack里配置vux-loader 的vux-ui这个插件了吗
配置了
module.exports = vuxLoader.merge(webpackConfig, {
plugins: [
{
name: 'vux-ui'
},
{
name: 'duplicate-style'
}
]
})
我就在官方template基础上改了baseconfig,和装了相关依赖
你用的是eslint哪个标准?
const router = new VueRouter({
scrollBehavior,
mode: 'history',
routes: [{
path: '/home',
name: 'home',
component: r => require.ensure([], () => r(require('./home')), 'home')
}, {
path: '/pay',
name: 'pay',
component: r => require.ensure([], () => r(require('./pay')), 'pay')
}, {
path: '/coupons',
name: 'coupons',
component: r => require.ensure([], () => r(require('./coupons')), 'coupons')
}, { path: '*', redirect: '/pay' }]
});
是我主入口代码分割的问题?
你初始化时选的eslint是 airbnb
对吧,目测是 airbnb 的eslint 超严格配置
'rules': {
// don't require .vue extension when importing
'import/extensions': ['off', 'always', { // 设为 off
'js': 'never',
'vue': 'never'
}],
'import/no-unresolved': [0, {commonjs: true, amd: true}], // 添加这一行
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
}
原来如此。。解决了。。
楼主,你是怎么解决的。我的报错是这样,Can't resolve 'vux' in 'D:\Work\VueJs\ThisProject\src\components'
根据文档安装vux-loader
生效但是没样式
以下方式生效