-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Vite fails to parse worker options when they are stored in a variable #18651
Comments
It looks like the fix is on going here emscripten-core/emscripten#22834 Also remembered we already had a discussion on Vite side in #18396 |
But I think vite should be able to parse this static variable, and it doesn't,And I didn't find a way to modify the configuration to ignore this error |
This js is automatically generated, and I don't want to modify the source code every time it is generated |
FYI, workaround is suggested in emscripten-core/emscripten#22394 (comment) |
Thanks for your solution, I solved this problem with https://gist.github.com/jamsinclair/6ad148d0590291077a4ce389c2b274ea I initially wanted to write a plug-in replacement, but not familiar with the vite plug-in, the GPT code can not be used |
Describe the bug
Title: Vite fails to parse worker options when they are stored in a variable
Description:
When using Vite with the following code, an error occurs during the bundling process:
The error message is:
However, the following code does not throw an error:
The Emscripten community has also mentioned this bug but cannot fix it on their end, as it is a Vite issue. As a workaround, I have to manually add the /* @vite-ignore */ comment to the worker options like this:
Reproduction
emscripten-core/emscripten#20452
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: