Microsoft/monaco-editor

Unable to load web workers in Electron app with Webpack

Open

#2.087 geöffnet am 20. Aug. 2020

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1.283 Forks)batch import
bughelp wantedintegrationwebpack-plugin

Repository-Metriken

Stars
 (14.836 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6h 26m) (15 gemergte PRs in 30 T)

Beschreibung

monaco-editor version: 0.20.0 Browser: Electron 8 (chromium) OS: MacOS 10.15.6 Repo with reproducible issue: https://github.com/alanqthomas/electron-webpack-monaco-test

I've created a basic Electron app using the boilerplate from. https://github.com/electron-react-boilerplate/electron-react-boilerplate

I also added a custom language implementation, basically just copy/pasting the relevant bits from https://github.com/amazzalel-habib/TodoLangEditor.

I get the following errors when monaco tries to load the web worker: Screen Shot 2020-08-20 at 1 41 42 PM

I've searched far and wide on github and stack overflow for solutions but I can't seem to find anything that works. I have a feeling this might have more to do with webpack/the build, but I'm not sure if that's an issue with my configuration or a limitation of monaco editor.

Please see the linked repo to reproduce the issue. It can be run with yarn install followed by yarn dev. The relevant webpack config is in configs/webpack.config.renderer.dev.babel.js.

Any pointers in the right direction would be much appreciated.

Contributor Guide