Why publish Theia extension's sources?

In spite of existing lib folder that includes bundles of an application, why extension’s source in the node_modules folder should be in a package?

Hi @cenkce,

I’m not an expert on the electron build (pinging @paul-marechal) but I think there are two main reasons for the need to bundle the node_modules folder in your app:

  1. The node_modules folder contains native dependencies which will be needed by the end-user in order for Theia to run successfully.
  2. AFAIK the backend of Theia isn’t web-bundled (with webpack or something similar). Since the electron App actually starts the Theia server backend, it needs some dependencies that might live inside of the node_modules.

so that is bundle necessary? Already same codes in node_modules and increases installer size. And I can’t hide my extension source in that way, what do you recommend to hide source-codes using obfuscation or an another way?

And also to decrease package size

If you are asking why we publish both JS (lib) and TS (src) when publishing Theia’s packages it is for dependents to easily debug their applications. You don’t have to do this with your own extensions. You can also delete those source files on postinstall (maybe worth deleting the various maps as well.)