new Class()
will not construct if the code is in template (eg. @click="() => { new MyClass() }
)
#217
Closed
7 tasks done
Labels
bug: upstream
Bug in a dependency of this repository
Describe the bug
I'm writing this code:
After
vite build
, this code is transformed intoWhere
F(xd)
is:Which seems telling if it is a "ref", and the code throw:
I assume that it is because
new F(xd)()
is not equal tonew xd()
?This seems the same problem:
https://stackoverflow.com/questions/74069642/class-constructor-cannot-be-invoked-without-new-instantiating-own-class-i
Reproduction
The
GameEvent
has a custom constructor, and it is declared inelectron/core/game.ts
The Vue page is declared in
src/components/Editor.vue
Steps to reproduce
I use Vue in electron, but this problem should apply to all because it is generated by
vite-build
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: