-
Notifications
You must be signed in to change notification settings - Fork 151
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
[0.x] Web Workers return 404 #112
Comments
Hi @DarkGhostHunter, this looks like the same issue as #106. I believe this is an upstream issue with Vite, but I'd be curious to know whether the problem exists without this plugin, by manually configuring Vite following https://vitejs.dev/guide/backend-integration.html |
It's somewhat the same. My goal was to include I'll try the manual backend config. |
Please see the other issue, thanks. |
I was able to replicate the problem, and it seems that when using a backend instead of using Vite as a proxy won't allow web workers because what you said earlier: the browser doesn't allow web worker to run from different ports, even in the same domain. In other words, to this to successfully work, the only workaround is to access the server through Vite:
|
There is a workaround for this issue: vitejs/vite#13680 (comment) |
Description:
Using
monaco-editor
, which requires Web Workers to be registered to enable functionality, using it as instructed, the Web Workers are requested with invalid URLs.Note that the workers URL is generated incorrectly by Vite by appending
/
to the worker URL:Details in this Stack Overflow question.
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: