Have the server build VS. check in & push a locally built app

What are some pro/cons to pushing built code vs. having the server build it?

This is a general question, but here's my specific scenario to illustrate what I'm talking about: On Heroku I've got a React app that has a simple express server to do OAuth. Currently, I have a postinstall hook in my package.json that runs a webpack production config to do some extract-text stuff and create a dist/ directory with my bundled, uglifyied code. To get all of this to run on Heroku I had to mark pretty much all of my dependencies as 'dependencies' instead of 'devDependencies'.

I know it's a bad practice to check my dist/ into git but it would save me from having to install a dozen plus node_modules on the server. Any thoughts?

链接地址: http://www.djcxy.com/p/85104.html

上一篇: 应用程序部署到Heroku时未找到Webpack

下一篇: 让服务器构建VS. 检入并推送本地构建的应用程序