在 Heroku 上部署 Vite React 应用程序时遇到问题
I'm having problem with my app. I've successfully pushed all the files onto the site, but I've discovered that it's starting my app with npm start. I need it to use 'npm run dev' instead.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法是创建一个启动脚本并将要在生产中运行的命令放入其中。
如果您想要相同的命令,请将“dev”脚本的代码放在“start”脚本中,
因为“dev”脚本包含开发命令,而“start”应包含生产脚本。
Easiest way is to create a start script and put the command you want to run in production.
If you want the same command, put the 'dev' script's code in 'start' script
As 'dev' script contains command for development and 'start' should contain production script.