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"
}
]
}
}