Next.js Discord

Discord Forum

How to correctly deploy a Nextjs application in firebase?

Unanswered
False honey ant posted this in #help-forum
Open in Discord
False honey antOP
Hello. good afternoon to all. I have a small query, I'm trying to deploy my application with firebase (As it has SSR parts I enabled the Cloud Functions) the problem is that the dynamic paths such as /blogs/[url] give me errors 500. On vercel the site works normally

2 Replies

try add these rewrite rules to firebase.json
"rewrites": [
  {
    "source": "**",
    "function": "the name of cloud function"
  },
  {
    "source": "**/**",
    "function": "the name of cloud function"
  }
],