I would like to deploy a nodejs project with frequent updates. npm is not available on the site, so I have to pack node_modules. This works fine, but it takes a long time to send to the client via an accessible ftp connection (80 MB of mostly node_module files each time). My workflow is as follows:
git clone project npm install
The build step minimizes my code just for what is needed. The node_modules folder is copied to the assembly folder. If I use npm install --production , I get a smaller size, but skip the tools I need to create it first. Therefore, in the end, I will make some effort to make my code size small, but all my work has been canceled, because I need to pack such a large tree node_modules.
Is my approach wrong? Is there an easier way to deploy when npm is not available on the production server or is there a good way to reduce the size of the node_modules folder?
source share