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 console
this.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.