palerdot / vue-speedometer

Vue component library for showing speedometer like gauge using d3
https://palerdot.in/vue-speedometer
MIT License
60 stars 8 forks source link

TypeError: this.querySelector is not a function #68

Closed MattDuart closed 11 months ago

MattDuart commented 11 months ago

Sorry to repost this issue once it had already appeared over here. But I'm having the exact same issue, using version 2.0.0 and Quasar: Build mode............. spa Pkg quasar............. v2.14.1 Pkg @quasar/app-vite... v1.7.1 Pkg vite............... v2.9.16

As far as I understood this shouldn't happen with vite... It works perfectly on DEV mode, but after vite it will never work.

I've tried a lot of things, but so far, nothing has worked. I would appreciate any ideas because I'm running out of them.

Tks

palerdot commented 11 months ago

As far as I understood this shouldn't happen with vite

This has more to do with Vue v2.0 and runtimeCompiler config than vite. Maybe upgrade to Vue 3 if you are sticking to vue 2. There is nothing more I can do to this help on this issue. You might have better chance from people using your particular set of build setup and vue dependencies like quasar

palerdot commented 11 months ago

runtimeCompiler equivalent for Vite - https://github.com/vitejs/vite/discussions/4158

Adding this for future reference here so that people don't create new issues for their build setup issues.

palerdot commented 8 months ago

v3 is published with composition api/SFC (single file component) support. This is the recommended version for Vue 3 composition api users.