引入vux,v-chart 报错,错误信息如下:ERROR Failed to compile with 1 errors 18:17:42error 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)
| })
1 回答
蓝山帝景
TA贡献1843条经验 获得超7个赞
谢邀!
vux2必须配合vux-loader使用, 请在build/webpack.base.conf.js里参照如下代码进行配置:
const vuxLoader = require('vux-loader')const webpackConfig = originalConfig // 原来的 module.exports 代码赋值给变量 webpackConfigmodule.exports = vuxLoader.merge(webpackConfig, { plugins: ['vux-ui'] })
具体参考:安装使用(webpack)
添加回答
举报
0/150
提交
取消