-
Notifications
You must be signed in to change notification settings - Fork 67
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
doesn't work with worker #23
Comments
About |
Thank you for investigating deeper and moving the issue! |
Describe the bug
I was trying to upgrade one of the projects I work to Vite 4.
Everything worked fine except the web worker which is served as raw Typescript to the web browser.
This work project is using
?worker&inline
but I tried to make a small repro using the more recommended way (new Worker(new URL(...))
) and it exhibits the same issue.Reproduction
https://github.com/val1984/vite4-worker-ts
Steps to reproduce
What should be displayed: a log containing
Worker lives!
What actually happens: an error log
SyntaxError: Unexpected token ':'. Expected an opening '{' at the start of a function body.
due to the: void
type annotation in the worker.ts file served without being transformed.System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: