-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Description
- Read the docs.
- Use Vite >=2.0. (1.x is no longer supported)
- If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.
Describe the bug
1, I can't import other script/lib in worker, when Import other script, worker init failed and not error msg.
2, How can I use sharedworker in vite? I use import url, but it also can't import other script
I try this way, but failed. chrome inspect can see error log:
import SW_URL from "./sharedworker.js?url";
const sw = new SharedWorker(SW_URL);

Reproduction
System Info
viteversion: ^2.0.0-beta.65- Operating System: windows10
- Node version: 14
- Package manager (npm/yarn/pnpm) and version: yarn 1.22.4