github-actions[bot] opened a new pull request, #67469: URL: https://github.com/apache/airflow/pull/67469
In dev mode the SPA shell is served by the airflow api-server while Vite serves assets on a different origin. Module workers cannot be constructed cross-origin even when CORS allows the fetch — Chrome refuses with 'Script at <vite url> cannot be accessed from origin <api-server>'. Monaco then falls back to 'main-thread workers', whose `$loadForeignModule` path tries to resolve module IDs through the non-existent AMD `require.toUrl`, flooding the console with `Cannot read properties of undefined (reading 'toUrl')` errors. Swap the `?worker` constructor imports for `?url` imports and construct workers from a same-origin Blob shim that simply re-imports the resolved URL. The Blob lives on the page origin so the Worker constructor accepts it, and the inner cross-origin `import` is permitted by Vite's CORS response. Closes #67342. (cherry picked from commit 68629ffd9fc63978e0d39dde16cb4f3890d06af3) Co-authored-by: Pierre Jeambrun <[email protected]> Co-authored-by: Rahul Vats <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
