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

Update to monaco-vscode-api 3.2.1 #618

Merged
merged 2 commits into from
Mar 22, 2024
Merged

Update to monaco-vscode-api 3.2.1 #618

merged 2 commits into from
Mar 22, 2024

Conversation

kaisalmen
Copy link
Collaborator

Using the standalone packages from monaco-editor works. Transformation of workers to esm bundles also works fine. Loading the workers directly via the factory function does not. I don't understand yet why. Editor worker is no problem.

@kaisalmen kaisalmen requested a review from CGNonofr as a code owner March 21, 2024 15:06
@kaisalmen kaisalmen marked this pull request as draft March 21, 2024 15:06
@CGNonofr
Copy link
Collaborator

What is the errors with the workers?

@kaisalmen
Copy link
Collaborator Author

kaisalmen commented Mar 21, 2024

@CGNonofr first, one guy called Kai is unable to type properly. Then vite gets confused if you specify this (js extension):

typescript: () => new Worker(new URL('@codingame/monaco-vscode-standalone-typescript-language-features/worker.js', import.meta.url), { type: 'module' })

instead of this:

typescript: () => new Worker(new URL('@codingame/monaco-vscode-standalone-typescript-language-features/worker', import.meta.url), { type: 'module' })

It is now working.

@kaisalmen kaisalmen changed the title WIP: Update to monaco-vscode-api 3.2.1 Update to monaco-vscode-api 3.2.1 Mar 21, 2024
@CGNonofr
Copy link
Collaborator

@CGNonofr first, one guy called Kai is unable to type properly. Then vite gets confused if you specify this (js extension):

typescript: () => new Worker(new URL('@codingame/monaco-vscode-standalone-typescript-language-features/worker.js', import.meta.url), { type: 'module' })

instead of this:

typescript: () => new Worker(new URL('@codingame/monaco-vscode-standalone-typescript-language-features/worker', import.meta.url), { type: 'module' })

Yep, that's because as soon as you have an exports field in your package.json, you can't import any other file directly. It's not really a vite specificity. What is specific to vite is that if the url of the worker can't be resolved, it just gives up transforming it without errors.

So everything is fine now?

@kaisalmen
Copy link
Collaborator Author

What is specific to vite is that if the url of the worker can't be resolved, it just gives up transforming it without errors.

It says the file is not there and that is just not true. It has no visibility due to the extra export. I like that you did that actually.

So everything is fine now?

Yes

- Disbale yarn verification in ci
@kaisalmen
Copy link
Collaborator Author

kaisalmen commented Mar 21, 2024

@CGNonofr I disabled the yarn verification in the CI. It is making trouble all the time because it can't resolve local dependencies.

@kaisalmen kaisalmen marked this pull request as ready for review March 21, 2024 15:52
README.md Outdated Show resolved Hide resolved
packages/client/CHANGELOG.md Outdated Show resolved Hide resolved
@kaisalmen
Copy link
Collaborator Author

@CGNonofr this is now really ready.

@kaisalmen kaisalmen merged commit 93c817f into main Mar 22, 2024
2 checks passed
@kaisalmen kaisalmen deleted the mva-32x branch March 22, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants