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

How to keep multiple different monaco-editor instance in one project? #35

Open
IsLand-x opened this issue Aug 4, 2023 · 3 comments
Open

Comments

@IsLand-x
Copy link

IsLand-x commented Aug 4, 2023

Our project depends on another dependency which uses an old version monaco, but our project uses a newer one.
Both our project and the dependency use monaco-loader to load monaco.
But I don't know why once we import the dependency, the monaco-loader loads the older one instead the newer one.
So, is there any method to make the monaco instance only takes effect in the specific area or namespace?

@suren-atoyan
Copy link
Owner

Currently, it's not possible with the same monaco-loader. monaco-loader loads monaco once and always returns what it loaded the first time.

@IsLand-x
Copy link
Author

IsLand-x commented Aug 8, 2023

So the old monaco in dependency can be "override" if I ensure the new monaco in my project loads first? For example, load it in the "index.tsx" of my project?

@suren-atoyan
Copy link
Owner

So the old monaco in dependency can be "override" if I ensure the new monaco in my project loads first?

right (if we are talking about monaco-usage only by @monaco-editor/react)

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

No branches or pull requests

2 participants