Search code examples
reactjsfirebasefirebase-hosting

Warning after deploy in Firebase


I hope someone could help me to solve this issue. I'm quite new with React and Firebase, after running a build inside the project I deployed it on Firebase, but I receive this warning. I really don't understand what I could do. Thanks in advance.

Welcome Firebase Hosting Setup Complete You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary!

enter image description here


Solution

  • As @DougStevenson said, you have deployed the default content.

    Since this is a React app, you want to do a build (typically npm run build) of your React project and then deploy the build output (typically in a folder named build or dist). You can either change the build output location by modifying your project's build configuration, or you can modify the hosting.public property in firebase.json so that it points to the build output folder.

    For example, you might set in firebase.json:

    {
      "hosting": {
        "public": "dist",
        "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
      },
      .................
    }