Bundle NPM package dependencies (speed up install time up to x8)
There are two ways to bundle NPM package dependencies:
- https://docs.npmjs.com/files/package.json#bundleddependencies; and
- https://github.com/gajus/bundle-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.
Written by Gajus Kuizinas
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Node
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#