konvajs / vue-konva

Vue & Canvas - JavaScript library for drawing complex canvas graphics using Vue.
https://konvajs.github.io/docs/vue/
MIT License
1.18k stars 131 forks source link

Vue konva with quasar cli 2 #232

Open LukaszSwierzewski opened 9 months ago

LukaszSwierzewski commented 9 months ago

Is integration with Quasar CLI planned? After importing vue-konva into Quasar, I get an error as shown in the picture. Perhaps I'm just setting something wrong, as importing packages works a bit differently in Quasar.

I inject Konva in the boot file as it is in the Quasar documentation (code snippet below), and unfortunately, it doesn't work.

Zrzut ekranu 2024-02-7 o 09 30 49

import VueKonva from 'vue-konva';
import { boot } from 'quasar/wrappers';
export default boot(({ app }) => {
  app.use(VueKonva);
});
LukaszSwierzewski commented 9 months ago

here is reproduction repo: https://github.com/LukaszSwierzewski/konva-quasar

LukaszSwierzewski commented 9 months ago

With quasar + webpack it is working. Any idea how to run this with vite?

StephanEnseleit commented 8 months ago

I ran into the same issue and didn't come up with a solution yet. Could you find a solution to this?

This issue only came up when I wanted to update my quasar project from 2.14.2 to 2.15.0 including updating from vue 3.3.9 to 3.4.2

StephanEnseleit commented 8 months ago

Going back from vue 3.4.x to vue 3.3.x seems to solve my problems. Looking at the package.json file in this repo, it states that vue 3.2 should be used. So i guess updating vue-konva to newer vue versions should be done i guess.

DanOrdant commented 8 months ago

Yes same here, not able to update vue and quasar...