Replies: 4 comments 2 replies
-
I've tried with a simpler customer electron boilerplate and it seems the problem might not be related to the devpack webserver but to the ability of the Monaco initializing the editor main js. I still haven't figured it out. |
Beta Was this translation helpful? Give feedback.
-
Related issue and solution here |
Beta Was this translation helpful? Give feedback.
-
I've the same issue, but I'm attempting to use |
Beta Was this translation helpful? Give feedback.
-
any solution? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to use monaco-react together with electron and webpack but so far without much success. Would really appreciate some help.
My current project setup has been created from scratch, that is, without any boilerplate such as CRA.
In order to test my electron app, I use webpack serve. I'm struggling in configuring the monaco-react to use my node_modules monaco-editor package instead of the CDN.
Since I'm using webpack serve, electron runs the window from localhost:4000/ (which is what I've configured in my webpack config file).
In order to be able to use monaco-editor locally instead of the CDN, I've:
new CopyWebpackPlugin({ patterns: [ { from: path.resolve(__dirname, '../node_modules', 'monaco-editor', 'min', 'vs'), to: 'vs', }, { from: path.resolve(__dirname,'../node_modules','monaco-editor','min-maps','vs'), to: path.join('min-maps/vs'), }, ], })
This part seems to be working as when I fire up webpack dev server I can see a vs folder on my localhost:4000 together with my bundle.js.
Now the problem is how do I tell my app that the vs folder is actually at my localhost:4000/vs instead of the CDN?
I've tried the following:
loader.config({ paths: { vs: 'http://localhost:4000/vs' }, });
However this results in the following error:
I've tried already other paths but so far no success, so any ideas are welcome.
Thanks,
Tiago
Beta Was this translation helpful? Give feedback.
All reactions