How to include subdirectories in firebase hosting

随声附和 提交于 2019-12-05 18:24:12
mckoss

(Frank's comment was really an answer)

Firebase deploys everything under the directory that you indicate. So if you have your main page (index.html) in the current and directory and the other pages in subdirectories under that, they should all be deployed if you configure public to point to the current directory.

Deployment Configuration

Update Node (npm) and Firebase CLI tools

We had a problem related to this... After some time of no relation with Firebase we created a similar new project and uploaded the new files for the hosting. All seemed to work fine, except for ONE thing: sub-directories of the hosting simply didn't appear to have loaded, even when the number of files was correct on the Hosting section of the console.

After more than one day of updating all projects files, looking for answer (like in here) and more tests, we finally also updated NodeJS (npm) and Firebase CLI tools... that solved the problem.

So, always update the framework first.

For me it was a browser cache issue (with pwa), when I used a different browser it worked. And yes, I changed my firebase.json to this (it was "public": "public"):

{
  "hosting": {
    "public": ".",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!