目前我正在https://selly-midtrans.herokuapp.com/中创建一个简单的反应应用,但是当我部署它时,它给了我一些错误
我已按照https://reactjs.org/docs/optimizing-performance.html#use-the-production-build进行操作,因此我运行了heroku run npm run build
但似乎没有改变我的作品中的任何内容
任何建议人员?我非常感谢你的任何建议
答案 0 :(得分:0)
默认的heroku buildpack将运行npm start
,这将启动开发服务器。
您需要使用https://github.com/mars/create-react-app-buildpack
来实际构建应用的生产版本并提供静态资产。