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?