You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am facing issue in building react application having this dependency. I am getting error in with the unnecessary monaco files which II guess not required for collab extension.
Module parse failed: Unexpected token (156:11)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| dispose() {
| onLanguageListener.dispose();
> mode?.dispose();
| mode = void 0;
| }
If I rebuild the monaco-collab-ext with replacing import * as monaco from "monaco-editor" with import * as monaco from "monaco-editor/esm/vs/editor/editor.api" Then the above issue is not coming and everything works fine. So, my suggestion is why not to just import monaco api's instead of whole heavy monaco editor installation. If other things not required.
Also, on searching everywhere the above error could also be solved by changing webpack configuration. But my doubt is why to go into hassle of changing/overriding webpack config, if it could easliy solve by importing monaco api only.
What is the opinion about this issue?
The text was updated successfully, but these errors were encountered:
I think you're just lucky that there is no recent syntaxes in the monaco editor api only, it may change in the future
Monaco editor doesn't transpile the code into old es5 anymore, so you have to do it yourself, and that's a good thing: you can decide your level of browser compatibility
Btw I still think it could be a good idea to not force the user to import everything from monaco
Hello,
I am facing issue in building react application having this dependency. I am getting error in with the unnecessary monaco files which II guess not required for collab extension.
If I rebuild the monaco-collab-ext with replacing
import * as monaco from "monaco-editor"
withimport * as monaco from "monaco-editor/esm/vs/editor/editor.api"
Then the above issue is not coming and everything works fine. So, my suggestion is why not to just import monaco api's instead of whole heavy monaco editor installation. If other things not required.Also, on searching everywhere the above error could also be solved by changing webpack configuration. But my doubt is why to go into hassle of changing/overriding webpack config, if it could easliy solve by importing monaco api only.
What is the opinion about this issue?
The text was updated successfully, but these errors were encountered: