mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
By my calculations, the sum of the sizes of the individual isopackets was 152MB, and the size of the combined isopacket is now just 36MB. That remarkable difference goes to show how much duplication of transitive dependencies was happening before this change. That's a savings of 116MB for the (uncompressed) size of the meteor-tool package. In Meteor 1.5.x, the meteor-tool package is about 544MB, but in Meteor 1.6 it's considerably smaller: 373MB. In other words, this change should reduce those sizes to 428MB (-21%) and 257MB (-31%), respectively.
Uninteresting files that run on tool's startup (set up profilers, transpilers, etc) and exit (clean up code, flush the output).
ES2015 compilation for tool
There are two different configurations of Babel for the tools code:
- local development from git checkout
- running in production from a release
In the first case, it is enough to register Babel's hook for require. For the
latter, this hook should be removed (#RemoveInProd) and the files should be
explicitly compiled.
The listing of Babel-compiled files can be found in isopack.js, the
Isopack#_writeTool method runs all the preprocessing when tools files are
copied for a release package.