eclipse-wildwebdeveloper / wildwebdeveloper

Simple and productive Web Development Tools in the Eclipse IDE
https://projects.eclipse.org/projects/tools.wildwebdeveloper
Eclipse Public License 2.0
189 stars 70 forks source link

plugin deploys a lot of files instead of single jar #1351

Open jukzi opened 11 months ago

jukzi commented 11 months ago

originally reported in https://github.com/eclipse-platform/eclipse.platform/issues/722 image

zulus commented 11 months ago

These files are required to run language servers. We could investigate possibility to build and embed vercel bundles: https://github.com/vercel/ncc

mickaelistria commented 11 months ago

I don't know anything about vercel but I am a bit skeptical that it can work perfectly for the numerous modules we have; and the various entry points we consume.

Even if we bundle org.eclipse.wildwebdeveloper as a jar, we will need to expand the node_modules somewhere on filesystem at some point for the LSs to work. So it's either we have some time lost during unpack/install (which is expected to take some time usually), or we have it a jarred bundle and the time expanding the node_modules will then be spent at runtime before starting the language server, resulting in high CPU/filesystem consumption and a delay at usage that may give the impression Wild Web Developer is bogus. I think the current state is the less worse of all known possible ones.

zulus commented 11 months ago

How about esbuild? I think this allow us reduce node_modules to ~40mb in couple js files. For example vuejs languageserver can be just 5mb js file

mickaelistria commented 11 months ago

I'm not familiar with all those technologies in general and I don't know how well they handle the case of node_modules being shared by various entry-points. But whatever can be made to work without negative impact on features or UX and with a positive impact on files/space/performance is always welcome.

zulus commented 11 months ago

In general esbuild will compile parts from node_modules that are used by entrypoints into one file, except parts that will be marked as well known external (for example typescript sdk), so after build you don't need node_modules at all. As the result of entrypoint using only one method from lodash, only this method will be part of bundle

In similar way vscode extensions are bundled (esbuild, webpack, etc...) so they are relatively small