DevOps

Deploying Localess on Firebase Hosting

How to configure Firebase Hosting to serve your Localess-powered site with optimal caching and CDN performance.

·
Priya Nair· Solutions Architect
How to configure Firebase Hosting to serve your Localess-powered site with optimal caching and CDN performance.

Firebase Hosting pairs naturally with Localess — both run on Google's infrastructure, which means low-latency content delivery for your users.

Static export setup

Configure Next.js to produce a static export:

// next.config.ts
export default { output: 'export' };

firebase.json

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

Deploy

npm run build && firebase deploy --only hosting

Cache headers

Add Cache-Control headers in firebase.json to maximise CDN hit rates for static assets.