Search code examples
javascriptfirebaseterminalfirebase-hostingfirebase-cli

When deploying firebase files, index.html is not being updated


When I open a terminal in my firebase folder with all the dependancies and files etc, and I type 'firebase deploy' into the terminal, all works fine and functions are updated and rules are updated, but the changes to index.html are not pushed to the website. Is there a setting I can check or something that would make it push again?


Solution

  • Assuming you are hosting the index.html in addition to function deployments: Is the index.html file in the folder specified under "hosting": { and not in the ignored files?

    You can also run firebase deploy --only hosting to only deploy hosting related changes.

    Since the file is in your root directory you need to set that as the public directory for firebase

    {
      "hosting": {
        "public": "/",
        ...
      }
    }