-
-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Description
Describe the bug
case: worker spawns a different worker
this doesn't work, the 2nd's worker's code is instead inlined in the first worker's code
example code:
// main.ts
import { Worker } from 'node:worker_threads'
import worker1 from './worker1.ts?modulePath'
new Worker(worker1)// worker1.ts
import { Worker } from 'node:worker_threads'
import worker2 from './worker2.ts?modulePath'
globalThis.test = '42'
new Worker(worker2)// worker2.ts
console.log(globalThis.test) // '42', should be undefinedhaving multiple ?modulePath imports inside main.ts however works...
new URL('./worker2.ts', import.meta.url) also does not work
Electron-Vite Version
5.0.0
Last Working Electron-Vite Version
4.0.0
Electron Version
38.0.0
Vite Version
7.3.0
Validations
- Follow the Code of Conduct.
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
haidar47x
Metadata
Metadata
Assignees
Labels
No labels