引入vux,v-chart 報錯,錯誤信息如下:ERROR Failed to compile with 1 errors 18:17:42error in ./node_modules/[email protected]@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
提交
取消