admin管理员组文章数量:1122846
I am using vue3 with vue-facing-decorator but when running dev server i am seeing error in console that Uncaught SyntaxError: Invalid or unexpected token
on @Component
Here is my package.json
{
"type": "module",
"dependencies": {
"pinia": "^2.2.6",
"vue": "^3.5.12",
"vue-facing-decorator": "^3.0.4",
"vue-router": "^4.4.5"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.9.0",
"@vitejs/plugin-vue": "^5.1.4",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"@vitest/eslint-plugin": "1.1.7",
"@vue/eslint-config-prettier": "^10.1.0",
"@vue/eslint-config-typescript": "^14.1.3",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.1",
"eslint": "^9.14.0",
"eslint-plugin-vue": "^9.30.0",
"jsdom": "^25.0.1",
"npm-run-all2": "^7.0.1",
"prettier": "^3.3.3",
"typescript": "~5.6.3",
"vite": "^5.4.10",
"vite-plugin-vue-devtools": "^7.5.4",
"vitest": "^2.1.4",
"vue-tsc": "^2.1.10"
}
}
}
tsConfig
My component where i am using vue-facing-decorator.
<script lang="ts">
import { Component, Vue, toNative } from "vue-facing-decorator";
@Component
class Workflow extends Vue {
getState() {
return "";
}
}
export default toNative(Workflow);
</script>
I tries adding "experimentalDecorators": true,
also look into /.
版权声明:本文标题:typescript - @Component Uncaught SyntaxError: Invalid or unexpected token when using vue-decorator - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736301876a1931328.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论