How to package the browser example app?

After building Theia from the source my folder size is 1GB, is there a way to package the browser example to avoid deploying 1GB of files on few VM’s where I want run Theia?

[original thread by Joseph benguira]

Hi @angelius . You would be able to save some storage by building the example application from package.json instead of from sources. e.g have a look at how we build the Theia application for our theiaide/theia docker image:

I get a final size: 612MB vs 1.1GB (from sources, including git repo)

[Joseph benguira]

Thanks, indeed this is helping. But I wonder how code-server managed to build a binary below 30MB!
For a lot of reasons I prefer Theia, I just need to find how to package it correctly :slight_smile:

I am down to 376M when I do the cleanups like in the Docker image. If I tar.gz it, the archive is 124 MB. It might be that Theia is pulling more/bigger NPM dependencies vs code-server

Another thing to potentially consider, at least for non-cloud use-cases: electron packaging using electron-builder. One can use this to get native packages for e.g. Windows, Ubuntu and others. See , but note that I expect this may not work ATM, since we recently switched to Electron 3.x / Node 10.x and we have not updated this application yet.

Right now backend source code is not obfuscated or minimized. There is on going effort to allow bundling of browser apps as well, maybe it will optimize the size as well. cc @kittaakos