Closed Lemour-sudo closed 6 months ago
Is there a way to avoid adding code that is not needed in order to just run the editor and a langium language worker?
A lot of efforts have be done to keep that library as modular as possible, allowing to only use what is needed (that's why there are 50+ optional services overrides)
Using LSP requires the VSCode api, and it's not possible to make it as modular as the services (you can't easily just remove mainThread/extHost protocol handlers)
I'm open to any contribution to improve it
The 10mb you're talking about are minified?
Got that. Yes the final 10mb is with the bundles minified.
@CGNonofr is this library itself minifying? I can see that the minify is set to false in the rollup options but I am not sure what that means.
Of course it's not, there's no point of minifying a library, it would just prevent the final minifier from doing an optimal job while making the debugging harder
Thanks! I am looking forward to the changes.
and https://github.com/CodinGame/monaco-vscode-api/pull/417 as well
everything is released as part of the v5
Thanks! Just saw about a 1mb drop in the final bundle size. I hope this helps in our overall application. So far, it looks like it will be worth breaking the language serve logic into its own compute platform from the Monaco editor UI itself.
I have been trying to add the monaco-editor to my application through the 'monaco-languageclient' and '@typefox/monaco-editor-react' but I realized a huge bump in the built bundle sizes -> an increase in about 10mb.
When running vite-bundle-visualizer in my project, it shows that 'vscode/src/vs' which corresponds to this library makes up 66% of the final bundle size.
Is there a way to avoid adding code that is not needed in order to just run the editor and a langium language worker?