Monaco Editor Console error: Unexpected Usage at EditorSimpleWorker.loadForeignModule

2.4k views Asked by At

I am getting Unexpected Usage error Console error when using Monaco Editor inside Electron App. The same code works in Website mode but not in Bundled Electorn app.

Console error Unexpected usage in Monaco Editor

As mentioned in comment at it may be due to Electron bundle uses file:/// as URI scheme and webworker doesn't work. I have tried solutions from multiple threads 1, 2 but none worked for me. I have also tried to add entry points in webpack for editor.worker, json/typescript workers.

Is there a workaround to get Monaco Webworker issue fixed fro Electron bundled app?

0

There are 0 answers