Skip to content
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

Inline workers fail in safari due to the use of data urls #2504

Closed
lucacasonato opened this issue Mar 14, 2021 · 2 comments · Fixed by #3468
Closed

Inline workers fail in safari due to the use of data urls #2504

lucacasonato opened this issue Mar 14, 2021 · 2 comments · Fixed by #3468
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@lucacasonato
Copy link

lucacasonato commented Mar 14, 2021

Describe the bug

Safari does not support base64 data urls in web workers:

Screenshot 2021-03-14 at 04 57 14

Vite uses data urls in workers when importing using the special ?worker&inline.

A possible fix would be to use inline blobs instead (using Blob and URL.createObjectURL).

Reproduction

// worker.js
console.log("Hey")
// main.js
import MyWorker from "./worker?worker&inline"
new MyWorker()

System Info

  • vite version: 2.0.5
  • Operating System: macOS arm64
  • Node version: v14.15.4
  • Package manager and version: yarn 1.22.10
@Xerios
Copy link
Contributor

Xerios commented May 6, 2021

I'm also experiencing same issue, something like this patch meganrogge/vscode@35e0aec would solve it

@nihalgonsalves nihalgonsalves added bug contribution welcome p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels May 11, 2021
@github-actions

This comment has been minimized.

@nihalgonsalves nihalgonsalves linked a pull request May 19, 2021 that will close this issue
9 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
3 participants