How does theia discover extensions for a browser build?

I found theia and am very impressed with it. It reminds me of Eclipse RCP, which I am also very fond of.

One thing has me stumped, and that is how theia discovers npm packages like workspace to automatically add it to the application. This for a browser target.

Thanks!

It looks like the plugins are discovered within the package.json file, so does that mean that the backend is responsible for loading and making modules available to the frontend for contribution?

Hi, yes as you’ve correctly identified, mainly the backend is responsible for loading extensions. Via json-rpc it will notify the frontend of any additional commands, menus, widgets, etc. so that the frontend is able to display them. Extensions will always be running in an isolated plugin host process that communicates with the backend via json-rpc as well. Afaik this is also the way vscode does this.

Any invoked extension code (e.g. via an executed command) is run in this plugin host process. This is true for both Electron and Browser targets.

VS Code extensions only.

If you’re referring to the Theia extensions; it’s a build time thing, and it’s generated from the application packages.json.