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

Consume ESM build of VS Code #14176

Open
tsmaeder opened this issue Sep 16, 2024 · 2 comments
Open

Consume ESM build of VS Code #14176

tsmaeder opened this issue Sep 16, 2024 · 2 comments
Labels
monaco issues related to monaco vscode issues related to VSCode compatibility

Comments

@tsmaeder
Copy link
Contributor

Feature Description:

VS code is moving to use ESM as their internal module system (microsoft/vscode#226260). While they might produce ALM builds for a while longer, we need to get ready to consume the ESM version of VS Code.
Our target module systems are webpack and nodejs. Both of those are able to load ESM modules from CommonJS modules. So we should be able to continue shipping Theia as a CommonJS framework. Moving Theia to ESM would affect all adopters, since importing CommonJS modules (Theia extensions) from the Theia framework is unlikely to work. Adopters would be forced to move to ESM, as well.

@tsmaeder
Copy link
Contributor Author

I was able to build the ESM version of @theia/monaco-editor-core of VS Code 1.93.1, but webpacking fails because of the dynamic ESM import in editorSimpleWorker.js 424:16-32. The system then tries to load all *.d.ts files in that directory and croaks. There is a ContextReplacentPlugin in webpack that should allow to fix this, but so far, no dice.

@tsmaeder tsmaeder added monaco issues related to monaco vscode issues related to VSCode compatibility labels Sep 16, 2024
@tsmaeder
Copy link
Contributor Author

I've been able to resolve the webpack issues by writing a webpack plugin, but with 1.93.1, there are now problems with the monaco-services we override/implement (circulare DI dependencies).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monaco issues related to monaco vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

1 participant