How to resolve the URL issue when deployed next js app to firebase

In this article, we will cover How to resolve the URL issue when deploying the next.js app to Firebase

Solution:

After deploying the Next.js app to the firebase.json add the ” “cleanUrls”: true,” Like shown Below

{
  "hosting": {
    "public": "out",
    "cleanUrls": true,
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  }
}

Leave a comment

Your email address will not be published. Required fields are marked *