Last Updated: July 25, 2019
· gajus

Bundle NPM package dependencies (speed up install time up to x8)

There are two ways to bundle NPM package dependencies:

The latter uses tar to bundle all dependencies into the package bundle. There is no duplication resolution or other post processing of ./node_modules other than extracting the tar.

bundleDependencies on the other hand will include all the dependencies, but it will extract them and attempt to resolve duplicates as usual. Therefore, you save time on network latency, but the biggest bottleneck is the post-processing.