vueblocks / ve-charts

📈 ECharts 4.x for Vue.js 2.x. | 📈 ECharts 5.x for Vue.js 3.x in next version.
https://vueblocks.github.io/ve-charts
213 stars 44 forks source link

npm 引入报错 #140

Closed zhongmax closed 3 years ago

zhongmax commented 3 years ago
"dependencies": {
    "ajv": "^7.2.1",
    "axios": "^0.18.0",
    "echarts": "^4.9.0",
    "element-ui": "^2.3.7",
    "js-cookie": "^2.2.0",
    "normalize.css": "^8.0.0",
    "nprogress": "^0.2.0",
    "v-distpicker": "^1.0.20",
    "ve-charts": "^0.9.5",
    "vue": "^2.5.2",
    "vue-router": "^3.0.1",
    "vuex": "^3.0.1"
  },

在 main.js 中,引入后,npm run dev 报错

import VeCharts from 've-charts'
Vue.use(VeCharts)

错误信息

ERROR  Failed to compile with 1 errors                                                         上午9:28:58

 error  in ./node_modules/ve-charts/lib/ve-charts.umd.min.js

Module parse failed: Unexpected token (8:48734)
You may need an appropriate loader to handle this file type.
|  * license : MIT
|  * http://adamwdraper.github.com/Numeral-js/
|  */(function(i,o){n=o,a="function"===typeof n?n.call(t,r,t,e):n,void 0===a||(e.exports=a)})(0,(function(){var e,t,r="2.0.6",n={},a={},i={currentLocale:............
@ ./src/main.js 8:0-33
 @ multi (webpack)-dev-server/client?http://localhost:9001 webpack/hot/dev-server ./src/main.js

因为对npm不太熟悉,不太清楚是什么问题