I am trying to deploy the next js application in firebase.
For which I have made firebase.json like,
{
"hosting": {
"public": ".next",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
With assumption I have given .next
as value for public but when running the app in firebase url, it says that the index.html file is missing like and hence throws page not found error,
If I give dist
then it throws error as there is no dist folder available.
So can you help me to exactly point out what happens when we build next js app using npm run build
and where does the index.html file comes under which folder?
This will help me to rightly point out the index.html which will run the app successful in firebase.
Please help me and I am stuck with this for long. Big thanks in advance.