-
-
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
Support naming worker with query suffix #12992
Comments
It seems const worker = new Worker(new URL('./worker.js', import.meta.url), { name: 'foo' }) I think it makes sense to add to the Query Suffixes one too. import MyWorker from './worker?worker'
const worker = new MyWorker({ name: 'foo' }) |
I didn't do the implementation with query suffix, but I implemented the naming method using a constructor. Can I try to pull request? (The query suffix implementation is having trouble with type definitions and I'm looking at this issue microsoft/TypeScript#38638 ) |
There's two ways to create a worker in Vite. One is by the Constructors and the other is by the query suffixes. In my previous comment, I suggested to add the Anyway, pull requests are welcome and are recommended if you have a concrete code as it's easier to discuss. |
Sorry for the delay! |
Description
The workers loaded using
?worker
is Untitled inchrome://inspect/#workers
.Need to provide an option for configuring the name.
Suggested solution
?worker&name=xxx
Alternative
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: