Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix loading of the LSP worker script in the online editor
The update to vite 4 triggered the vite 3 bug vitejs/vite#9879 for us, where the wasm-pack generated .js is included as iife and therefore the use of import.meta.url gets transpiled to some shim that tries to access the document, assuming that the JS is running in the browser instead of in a worker environment. Explicitly set the output type for the worker to ES modules, so that no changes are needed and import.meta.url remains in use. This matches the worker invocation anyway, as we pass "type": "module" to the Worker constructor.
- Loading branch information