Replies: 2 comments 1 reply
-
具体报错行是 |
Beta Was this translation helpful? Give feedback.
0 replies
-
初步解决了,好像是vue-demi产生的问题...直接在node_modules内将vue-demi中的vue2引用换成项目中的vue就正常了,想了半天不是很理解产生这个报错的原因,求大佬解答 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
现在有一个项目将流程图封装成了一个vue2组件
打包配置
"build": "vue-cli-service build --target lib --name bpmn --dest dist ./src/index.js",
index.js
const bpmnFlow = { install(Vue) { Vue.component('bpmn-flow', BpmnFlow) } } export default bpmnFlow
在该vue组件内引入@antv/x6-vue-shape后,在vue项目中使用能正常启动,但会报错
Uncaught TypeError: Cannot read properties of undefined (reading 'call') at __webpack_require__ (bpmn.common.js:635:39) at eval (bpmn.common.js:6602:66) at eval (bpmn.common.js:6831:50) at Object.eval (bpmn.common.js:6831:98) at eval (bpmn.common.js:6832:30) at ./src/temporary/bpmn.common.js (app.3b7f2f91e2c601c38ac3.js:4116:1) at __webpack_require__ (app.3b7f2f91e2c601c38ac3.js:833:30) at fn (app.3b7f2f91e2c601c38ac3.js:130:20) at eval (main.js:30:36) at ./src/main.js (app.3b7f2f91e2c601c38ac3.js:3985:1)
只要引入该依赖,不进行其他使用就会产生这个报错,去除该依赖的引用就正常了,求解vue2对该依赖二次封装后需要额外配置什么特殊的打包配置吗?
Beta Was this translation helpful? Give feedback.
All reactions