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

Error Unexpected token '{' after upgrade from [email protected] #17579

Closed
7 tasks done
k9p5 opened this issue Jun 27, 2024 · 2 comments
Closed
7 tasks done

Error Unexpected token '{' after upgrade from [email protected] #17579

k9p5 opened this issue Jun 27, 2024 · 2 comments

Comments

@k9p5
Copy link

k9p5 commented Jun 27, 2024

Describe the bug

My spa crashes on Safari Version 16.2 (18614.3.7.1.5) when I use static class members. They get transpiled into:

...
static {
  myvar = ...
}
...

Which Safari is unable to interpret. My typescript build target is es2021. When I downgrade vite from 5.3.1 to 4.3.9 the issue does not appear.

Reproduction

http://localhost:5173

Steps to reproduce

npm run dev

System Info

Safari Version 16.2 (18614.3.7.1.5)

Used Package Manager

npm

Logs

No response

Validations

@k9p5
Copy link
Author

k9p5 commented Jun 27, 2024

This appears to be the same issue as in #13863

@bluwy
Copy link
Member

bluwy commented Jun 28, 2024

If you're upgrading from v4 to v5, this is covered in the migration guide: https://vitejs.dev/guide/migration.html#update-experimentaldecorators-and-usedefineforclassfields-typescript-behaviour

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Jun 28, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants