{"id":19257551,"url":"https://github.com/ericvera/next-firebase-hosting-rewrites","last_synced_at":"2025-07-23T19:03:54.424Z","repository":{"id":119029954,"uuid":"368590147","full_name":"ericvera/next-firebase-hosting-rewrites","owner":"ericvera","description":"Ensure that firebase.json contains the appropriate hosting rewrites for NextJS dynamic routes.","archived":false,"fork":false,"pushed_at":"2023-10-26T22:23:15.000Z","size":43377,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T17:48:08.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericvera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-18T16:01:31.000Z","updated_at":"2023-10-26T21:08:06.000Z","dependencies_parsed_at":"2024-11-09T19:20:44.971Z","dependency_job_id":null,"html_url":"https://github.com/ericvera/next-firebase-hosting-rewrites","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"a0db1d0faf0324c18c029f0a9c04be1f45276e12"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericvera/next-firebase-hosting-rewrites","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericvera%2Fnext-firebase-hosting-rewrites","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericvera%2Fnext-firebase-hosting-rewrites/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericvera%2Fnext-firebase-hosting-rewrites/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericvera%2Fnext-firebase-hosting-rewrites/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericvera","download_url":"https://codeload.github.com/ericvera/next-firebase-hosting-rewrites/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericvera%2Fnext-firebase-hosting-rewrites/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266737568,"owners_count":23976389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T19:10:37.545Z","updated_at":"2025-07-23T19:03:54.400Z","avatar_url":"https://github.com/ericvera.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.JS Firebase Hosting Rewrite Rules Module\n\nEnsure that firebase.json contains the appropriate hosting rewrites for NextJS dynamic routes.\n\n## WARNINGS!\n\nThis module has been tested only in the described scenario using NextJS 13.5, Yarn 4 (with PnP), Node 20.\n\nMissing rewrite rules will fail your build and print out instructions on how to fix it.\n\n## Use this if\n\n1. You use `next export` to export your app to static HTML\n1. You deploy the static site to Firebase Hosting\n1. You deploy the site to one or more hosting sites\n\n## Usage\n\n```\nyarn add next-firebase-hosting-rewrites\n```\n\nOn your `next.config.js`\n\n```js\n// next.config.js\nconst { withFHR } = require('next-firebase-hosting-rewrites')([\n  'site-name-1',\n  'site-name-2',\n])\n\nmodule.exports = withFHR()\n```\n\n## Sample\n\nIf you have any of the following files in your NextJS project, it will result in the output below.\n\n- `pages/auth/action/reset-password/[oobCode].tsx`\n- `pages/auth/action/reset-password/[oobCode]/index.tsx`\n\n```\n[...]\ninfo  - using build directory: /Users/user/repo/hosting/.next\ninfo  - Copying \"static build\" directory\ninfo  - Launching 7 workers\n\u003e [FHR] Validating Firebase Hosting Rules (FHR)...\n\u003e [FHR] Found Firebase config at /Users/user/repo/firebase.json.\n\u003e [FHR] REWRITE RULE ERROR @ firebase.json/hosting/[site=\"site-name-1\"]\n\u003e [FHR] Missing rewrite rule for site path '/auth/action/reset-password/[oobCode]'.\n\u003e [FHR] Include the following rewrite rule in firebase.json:\n\u003e [FHR]\n\u003e [FHR] {\"source\":\"/auth/action/reset-password/*\",\"destination\":\"/auth/action/reset-password/[oobCode].html\"}\n\u003e [FHR]\nError: One or more rewrites rules missing or erroneous in '/Users/user/repo/firebase.json'.\n\n[...stack trace here]\n\nuser@Machine-Name hosting %\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericvera%2Fnext-firebase-hosting-rewrites","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericvera%2Fnext-firebase-hosting-rewrites","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericvera%2Fnext-firebase-hosting-rewrites/lists"}