Can we reduce the current build size?


When I upgraded some of my meteor projects, I noticed that with the recent meteor version the build size has increased significantly. Build sizes for my projects varies between 46 MB to 84MB (Compressed).

If you’ve got a decent internet speed then this isn’t an issue. Ideally, it takes between 12 to 17 minutes to deploy changes (I have got decent download speed but my upload speed is terrible).

I extract the build and looked into the bundle. These two packages struck out to me babel-compiler 86M and minifier-css 47M. Babel-compiler also has a typescript included which is 61MB in size

To dive deeper I created a starter project with meteor version 1.6 to 2.5.

| Meteor version | .tar.gz size |
|       1.6      | 7.2 MB       |
|       1.7      | 8.1 MB       |
|       1.8      | 6.9 MB       |
|       1.9      | 22.9 MB      |
|        2       | 30.3 MB      | 
|       2.1      | 30.3 MB      |
|       2.2      | 30.3 MB      |
|       2.3      | 30.5 MB      |
|       2.4      | 28.8 MB      |
|       2.5      | 28.8 MB      |

Here is the bundle size breakdown for all versions spreadsheet

The size of the bable-compiler in build with version 1.8 is 18M & which increases to 81M in build with version 1.9

Typescript support was introduced in meteor 1.8.2 and I think that could be one of the reasons for this size increase.

is there anything that we can do to reduce the build size?

would it be possible to not include typescript in bable-compiler if we are not using typescript?

is it possible to find an alternative to the current for the ‘minifier-css’ package?


This was already reported in Reduce build size by excluding dev packages · Issue #10902 · meteor/meteor · GitHub, but there’s no traction on it yet.


Our solution is to build everything where the app is going to be deployed. Not applicable for all cases but for those where it is applicable, this eliminates these issues of significant increases in the bundle size.