Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade TS target to ES6 #538

Open
ruojianll opened this issue Apr 7, 2023 · 3 comments
Open

Upgrade TS target to ES6 #538

ruojianll opened this issue Apr 7, 2023 · 3 comments

Comments

@ruojianll
Copy link

If a third package exported a ES6 native class, and a class in .vue file extends it. When calling super in constructor, get error TypeError: Class constructors cannot be invoked without 'new'.

Transformed classes (in ES5)) from .vue files are not compatible with native classes (in ES6) exported by third packages.

ES6 is also vue3 basic environment, so should we upgrade it?

https://github.com/vuejs/vue-jest/blob/master/packages/vue3-jest/lib/utils.js#L116

@windsurfing33
Copy link

That would be very useful for me :)

@rhianvanesch
Copy link

I've also been running into this issue, and it seems the problem is unfortunately more complex than just changing the target: #445 (comment). It is possible to add "downLevelIteratiion": true to your tsconfig.json's compilerOptions, but this will affect your production code as well.

@stephdz
Copy link

stephdz commented Aug 29, 2023

It would be useful for us too.
vue-jest is incompatible with facing-dev/vue-facing-decorator so we are stuck with deprecated vue-property-decorator and vue-class-component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants