1

What is the recommended approach to using build tools like Gulp and Browserify to build your app on deploy with Heroku? Heroku doesn't give much info other than it's possible.

The main reason I ask is because if you want to build your app on deploy you have to place your build tools in dependencies rather than devDependencies. That seems wrong to me and popular build tools like Gulp and Grunt instruct users to include them as dev dependencies so it seems like a common practice. I'm curious as to whether this is a subtle hint from Heroku to not build on deploy.

If Heroku is worried about dev dependencies polluting or compromising a production deployment npm prune --production can serve to prune non-production dependencies after postinstall scripts execute.

anthonator
  • 4,915
  • 7
  • 36
  • 50

0 Answers0