support `?inline` worker in constructors worker
See original GitHub issueClear and concise description of the problem
we can use inline worker with import worker from "./worker?worker&inline"
and need to support inline worker in constructors worker.
Suggested solution
- use query syntax
const worker = new Worker(new URL('./worker.js?inline', import.meta.url))
but the end goal is to remove query suffixes everywhere for Vite.
- put inline in worker options
const worker = new Worker(new URL('./worker.js', import.meta.url), {
inline: true
})
that’s non-standard
- use the comment
const worker = new Worker(new URL(/* #__INLINE__ */'./worker.js', import.meta.url))
and Rollup has a history of avoiding that too (e.g. webpackChunkName) and only supported pure comments thus far.
above solutions are not good.
this issue for it to discussed some ideas ❤️
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that request the same feature to avoid creating a duplicate.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:17 (11 by maintainers)
Top Results From Across the Web
WebWorker support? · Issue #312 · evanw/esbuild - GitHub
Side note: it's possible to (partially) minify worker code with the inline-worker technique: This is fragile and can easily break with esbuild.
Read more >INLINE CONSTRUCTION Careers and Employment - Indeed
Find out what works well at INLINE CONSTRUCTION from the people who know best. Get the inside scoop on jobs, salaries, top office...
Read more >5 Key Qualities of Skilled Construction Workers | Tradesmen
Skilled construction workers must have 5 essential skills. Explore these key construction skills and request skilled construction laborers ...
Read more >Using Web Workers - Web APIs - MDN Web Docs
Web Workers are a simple means for web content to run scripts in background threads. The worker thread can perform tasks without interfering ......
Read more >Construction Worker Jobs in Arkansas (Hiring Now!) - Zippia
Staffing Support Solutions logo. 4.2. Construction Helpers for Solar Farm Work · R Construction General Laborer. Richardson Properties, LLC · N Construction ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will have a deeper look into it later.
I don’t know either (limit requests?) but then just switch to http2. The only use case I can think of if you want to inline ALL workers. (When you want a single file so evrything is potentaly inlined into the html file)