首页 > 解决方案 > 如何更改 index.html(firebase 托管)以显示项目内容?

问题描述

我是 react-native 初学者,我尝试托管我的项目,但最终启动了一个显示 firebase 欢迎屏幕的 Web 应用程序。这是因为做 init firebase 时生成的 index.html。index.html 文件如下所示:

在此处输入图像描述

如何用我自己的前端代码替换 Index.html?我有一个 index.js 文件;这有什么关系吗?

非常感谢你的帮助!

标签: javascriptfirebasereact-nativefirebase-hostingreact-native-web

解决方案


当你跑

firebase init

从您的项目文件夹中,然后选择

使用现有项目

然后选择您拥有 index.html 的文件夹(通常是 ./build)并说“否”以覆盖。


推荐阅读