![](/img/trans.png)
[英]Deploying React project to Firebase leads to window that says "Firebase Hosting Setup Complete"
[英]Multi environment setup for firebase not deploying as expected
所以,我正在帮助某人完成一个由其他人开发的项目,但他离开了。 好吧,不太相关,但我正在努力让多环境设置运行。 希望有人能把我推向正确的方向。
一开始只有一个环境。 只有生产。 但是对于更改,我希望在生产环境旁边运行一个环境。 这将是演出。
我一直在搜索 web 以了解如何设置它,我得到了一些工作。 它似乎部署了所有内容,但是在暂存环境中看不到更改。
这是我现在在我的自述文件中的内容:
#### Deploy to staging
Build the application: `npm run build`
Make sure you are at the correct environment: `firebase use staging`
And apply the target (??) ; `firebase target:apply hosting staging exp-game-staging`
Now you can deploy with:
Initially, for fresh deploy: `firebase deploy`
And later for consequent deployments: `firebase deploy --only hosting`
这给出了以下 output:
=== Deploying to 'exp-game-staging'...
i deploying hosting
i hosting[exp-game-staging]: beginning deploy...
i hosting[exp-game-staging]: found 739 files in dist/exp-game-staging
✔ hosting[exp-game-staging]: file upload complete
i hosting[exp-game-staging]: finalizing version...
✔ hosting[exp-game-staging]: version finalized
i hosting[exp-game-staging]: releasing new version...
✔ hosting[exp-game-staging]: release complete
✔ Deploy complete!
Project Console: https://console.firebase.google.com/project/***/overview
Hosting URL: https://***.web.app
对于这些文件,这似乎可行,但它仍在使用暂存环境中的生产数据库。 在本地,情况并非如此,当我在本地开发时,它按预期使用了登台数据库。
有谁知道我在这里错过了什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.