Open hatedMe opened 1 year ago
Hi @hatedMe I might have the same problem but I'm getting
Uncaught SyntaxError: Invalid or unexpected token (at SomePage.vue:39:1)
when I try to use vue-class-component
. Is that the same error you are referring to?
Hade the same problem and found out that I had enabled typescript decorators the wrong place, namely in tsconfig.app.json. It needs to go into your top level tsconfig.json - like this:
{
"files": [],
"compilerOptions": {
"experimentalDecorators": true,
},
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
}
]
}
Hade the same problem and found out that I had enabled typescript decorators the wrong place, namely in tsconfig.app.json. It needs to go into your top level tsconfig.json - like this:
{ "files": [], "compilerOptions": { "experimentalDecorators": true, }, "references": [ { "path": "./tsconfig.node.json" }, { "path": "./tsconfig.app.json" } ] }
it works, you saved my day! thanks! @chessydk-vertica
Glad to hear!
Med venlig hilsen
Carsten Hess Extern frontender E-mail: @.**@.> Direct: +4551300250
Fra: HuangYu @.> Sendt: 22. april 2024 10:45 Til: vitejs/vite-plugin-vue2 @.> Cc: Carsten Hess @.>; Comment @.> Emne: Re: [vitejs/vite-plugin-vue2] Problem with using typescript decorator (Issue #89)
Hade the same problem and found out that I had enabled typescript decorators the wrong place, namely in tsconfig.app.json. It needs to go into your top level tsconfig.json - like this:
{ "files": [], "compilerOptions": { "experimentalDecorators": true, }, "references": [ { "path": "./tsconfig.node.json" }, { "path": "./tsconfig.app.json" } ] }
it works, you saved my day! thanks!
— Reply to this email directly, view it on GitHubhttps://github.com/vitejs/vite-plugin-vue2/issues/89#issuecomment-2068832954, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEJCGV3OERTJBEZTRJFAODDY6TEZLAVCNFSM6AAAAAAZ7X52SOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRYHAZTEOJVGQ. You are receiving this because you commented.Message ID: @.***>
Is there a feasible solution for the above code?