menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

How to package the browser example app?

April 21, 2019 at 8:55am

How to package the browser example app?

April 21, 2019 at 8:55am (Edited 3 years ago)
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?

April 22, 2019 at 12:22pm
Hi . 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: https://github.com/theia-ide/theia-apps/blob/master/theia-docker/Dockerfile#L6-L16
I get a final size: 612MB vs 1.1GB (from sources, including git repo)
Thanks, indeed this is helping. But I wonder how code-server managed to build a binary below 30MB! https://github.com/codercom/code-server/releases For a lot of reasons I prefer Theia, I just need to find how to package it correctly :)
Edited
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
like-fill
1
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 https://github.com/theia-ide/theia-apps/tree/master/theia-electron , 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.

April 23, 2019 at 6:24am
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
like-fill
1