In the past, I set up a "linked" folder in Envoyer for node_modules which sped up the deploy. While this helped some, there were still issues:
- It still wasn't that fast.
- If you ever had an issue installing new npm packages, and the build failed, you might have to wipe out your shared npm folder.
I've since removed all front end tasks from envoyer and just run and commit everything locally. So my general workflow is:
- Work as usual with [gulp|webpack] watch
- When ready to commit, stop watcher, run production [gulp|webpack] task
- Commit all compiled files - as well as the json manifest files
- Push
- Auto-deploy with Envoyer
On some projects deploy time went from 4-5 minutes to 20-30 seconds. If you're worried about a bunch of git diff noise with the compiled assets, you can use a .gitattributes file with public/* -diff that will suppress them.