出错提示:
ERROR Failed to compile with 1 errors 18:17:42
error in ./node_modules/_vux@2.9.1@vux/src/components/v-chart/mixin.js
Module parse failed: Unexpected token (18:6)
You may need an appropriate loader to handle this file type.
| this.$parent.set(this.chartName, {
| shape: defaultShapeMap[this.chartName] || '',
| ...this.$props,
| ...camelAttrs(this.$attrs)
| })
解决办法
vux官方文档提示
vux官方文档解决方案.png
即在末尾添加:
const vuxLoader = require('vux-loader')
const webpackConfig = module.exports
module.exports = vuxLoader.merge(webpackConfig, {
plugins: ['vux-ui']
})
(记得安装vux-loader
网友评论