Closed MrGreenTea closed 3 years ago
Ignoring those 404
for source maps it also does not work on production builds (with yarn run dist
as in the react-typescript example).
How to bundle the files monaco-editor
needs?
Hey there,
As this package focuses on the integration between Electron and snowpack I suggest first trying to run your use-case via snowpack and then debugging if there are any further issues with the Electron environment. Here's an https://github.com/microsoft/monaco-editor/issues/2227 issue that seems to discuss your issue, maybe that will help.
Hi sorry you're right. At first I was just wondering how to distribute files with this configuration and electron-builder
. Thanks for the link to the monaco-editor
issue, I'll try that one again :)
We are currently evaluating
snowpack
and I am very grateful for your work on this integration. We usemonaco-editor
in our app and using @monaco-editor/react for this works quite well. The only issue I am facing is that by default that package loads monaco sources from a CDN. We need to provide them ourselves and for that we have to includemonaco-editor/min/vs
directly or at least all scripts that are used from there (editor.worker.js, etc and one for every language). What do I have to do to achieve this? I have tried usingsnowpack-plugin-copy
but haven't yet found the place to copy these sources to. I also tried usingmount
insnowpack.config.js
like this:and then use
loader
like this:This kind of works but I get these errors:
I would really appreciate any help you can provide.