retejs / examples

26 stars 19 forks source link

problem on vue3 example (context menu not work) #70

Closed hashunst closed 3 years ago

hashunst commented 3 years ago

Hi, On Vue3 example, the context menu does not work. (when right click on editor)

the error in console browser is:

Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_1__.default is not a constructor at MainMenu._default (context-menu-plugin.esm.js?1b64:1073) at new MainMenu (context-menu-plugin.esm.js?1b64:1128) at eval (context-menu-plugin.esm.js?1b64:1326) at eval (rete.esm.js?f5d5:580) at Array.reduce () at EditorView.trigger (rete.esm.js?f5d5:579) at HTMLDivElement.eval (rete.esm.js?f5d5:1456)

what i know is the example is vue3 but the context-menu-plugin is vue2....

Thanks

hashunst commented 3 years ago

it solved by import seperation.... import TaskPlugin from "rete-task-plugin"; import { Task } from "rete-task-plugin";

chemicalcrux commented 3 years ago

I am also running into this. The rete-context-menu-plugin package uses new Vue(), which is only valid in Vue 2.

rete-task-plugin seems unrelated.

LeoDJ commented 2 years ago

@chemicalcrux I'm facing the exact same issue too, did you solve it in the meantime?