3 ms·
Why ship node_modules? Because you want to ship the complete app. At least rsync comes to the rescue for quick deploy of 10000 tiny files remotely.
by megous 5y ago
Why ship node_modules? Because you want to ship the complete app. At least rsync comes to the rescue for quick deploy of 10000 tiny files remotely.
- whostolemyhat 5y agoThat seems incredibly wasteful and time-consuming. You could only ship the source code and package-lock file and run `npm ci` or `npm install --production`, which would only install dependencies you're actually using on your production machine, rather than including testing libraries or build frameworks. Even better, you could set up a build and take advantage of tree-shaking (to some extent at least), then ship less code in fewer files.