Hello everyone,
I am trying to display the monaco-editor (https://www.npmjs.com/package/monaco-editor) inside Vaadin, it shows the pure javascript editor, but no css. I am guessing its because of webpack - but there are working examples with webpack, so I don’t know.
If anyone has any tips or can look inside the small project file - it would be much appreciated.
Hey Johny, thanks for a quick reply. Yes It in fact missing resources… but the solution was to put everything inside the resources/META-INF/resources/node_modules/monaco_editor/ folder, which I guess is an ugly solution but I don’t really get how I can import (publish) the whole folder without putting it there.
You can see the current version in the github link above. Thanks for help.
I am new to webpack and vaadin, maybe anyone has a tip where i should look into?
how can I enable webpack to pack my referenced node_modules webcomponent into the project?
It is really ugly to have to copy the whole node_modules/monaco-editor folder into the “/META-INF/resources/” Folder.
did you eventually find another way to get the monaco editor working or did you end up with the workaround of copying the folder node_modules/monaco-editor to resources/META-INF/resources/node_modules/monaco-editor
Also, did you maybe find out the reason why the monaco-editor makes problems here? Since one doesn’t have to do that with every @NpmPackage dependency.
You can check a demo project I tried few months ago.
If I remembered it correctly, I had to change the webpack.config.js and install some npm package manually (monaco-editor-plugin at least). The css is not working correctly if I’m using the css from webpack (still the css from using cdn). 18399285.zip (133 KB)