Skip to content

Make Monaco Editor compatible with Vite #249962

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

remcohaszing
Copy link
Contributor

Monaco Editor uses some static properties that reference the class they are defined in. This is equivalent to this. Monaco Editor also uses decorators. TypeScript compiles this in a way that works (with some small boilerplate code). In Vite however, this compiles to broken code.

This change replaces self-references via in static properties via their identifier with this.

The changes were cherry-picked from #249616.

Monaco Editor uses some static properties that reference the class they
are defined in. This is equivalent to `this`. Monaco Editor also uses
decorators. TypeScript compiles this in a way that works (with some
small boilerplate code). In Vite however, this compiles to broken code.

This change replaces self-references via in static properties via their
identifier with `this`.

The changes were cherry-picked from microsoft#249616.
@hediet hediet added this to the June 2025 milestone Jun 3, 2025
@hediet hediet modified the milestones: June 2025, July 2025 Jul 1, 2025
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.

3 participants