palerdot / vue-speedometer

Vue component library for showing speedometer like gauge using d3

Home Page:https://palerdot.in/vue-speedometer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get error after build

HosseinBabmoradi opened this issue · comments

when i run my project in dev mode the vue-speedometer works fine but in production after build the component doesnt show , even the empty component like this and i got this error in consolethis.querySelector is not a function`
what is wrong ?

runtime build has to be enabled in production. It depends on your project setup. For example, in old vue-cli you might have to add something like

// vue.config.js
module.exports = {
  runtimeCompiler: true
}

For newer vite based setups check out
vitejs/vite#4158

Also, please search issues in the repo as others have pointed out different solutions.
#67

Please note, this is not a library problem and it is a build setup/configuring issue.

you are right thanks , it helped

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