suren-atoyan / monaco-loader

The utility to easy setup monaco-editor into your browser
MIT License
177 stars 37 forks source link

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

Open IsLand-x opened 1 year ago

IsLand-x commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 11 months ago

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)