title: How do I use this monaco library in an electron app?
body: <p>How can I use monaco in my electron app? out <a href="https://github.com/TypeFox/monaco-languageclient/tree/master/example" rel="nofollow noreferrer">this</a> example: What's the proper way to do that?  i'm open to new suggestions. I throughout into building a micro frontends but it's not that nice in react/electron and in the end i would have to include the final index output file using iframe. I wish I could use something we do with dlls in desktop application. note: i'm new to react and electron, perdon mystakes that seems so simple.</p>
  <p>Well, I tried to &quot;merge&quot; as needed both webpack configs. Is this the way to go? so far i couldn't make it. I added:</p>
  <pre><code>  resolve: {
      alias: {
        'vscode': require.resolve('@codingame/monaco-languageclient/lib/vscode-compatibility')
      }
  </code></pre>
  <p>but it cannot find the vscode module, i'm getting the error:</p>
  <p><code>Module not found: Can't resolve 'vscode' in 'C:\Users\jjj\Desktop\merge\Newton\node_modules\vscode-languageclient\lib\common' even tho the package is installed.</code></p>
  <p>I also tried to add <code>&quot;editor.worker&quot;: 'monaco-editor/esm/vs/editor/editor.worker.js' </code> in the entry section but I got the error:</p>
  <p>An unhandled error has occurred inside Forge:
  Conflict: Multiple chunks emit assets to the same filename index.js (chunks 179 and 915)
  Error: Conflict: Multiple chunks emit assets to the same filename index.js (chunks 179 and 915)</p>
  <p>I did plan to -- assuming it's the proper way to go ---, once managed to fix this webpackes merge, I'd include the main file with the contents:</p>
  <pre><code>    require('monaco-editor');
      (self as any).MonacoEnvironment = {
          getWorkerUrl: () =&gt; './editor.worker.bundle.js'
      }
      require('./client');
  </code></pre>
  <p>then have
  <code>&lt;div id=&quot;container&quot; style=&quot;width:800px;height:600px;border:1px solid grey&quot;&gt;&lt;/div&gt;</code>
  somewhere to show the editor and the <code>&lt;script src=&quot;main.bundle.js&quot;&gt;&lt;/script&gt;</code> wouldn't be needed due to the fact it would be included in the webscript's output javascript bundle file, used elsewhere by the entire application.</p>