firebase-hosting-basics

Configure and deploy static web apps to Firebase Hosting via CLI.

Updated Aug 6, 2026
One-click install
npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill firebase-hosting-basics-ferrarifankid04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: firebase-hosting-basics
Source: https://github.com/ferrarifankid04/ai-skills-public/tree/main/antigravity/plugins/firebase/skills/firebase_hosting_basics
Command: npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill firebase-hosting-basics-ferrarifankid04

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires firebase-tools, and includes references (resource) components.

What problem does it solve? Deploying static sites and SPAs to Firebase Hosting requires correct firebase.json configuration, knowledge of deploy commands, and understanding of preview channels, which developers often get wrong or look up repeatedly. ## Core Features & Use Cases - Hosting Configuration: Set up firebase.json with public directories, rewrites, redirects, headers, clean URLs, and trailing slash behavior. - Deployment Workflows: Deploy to live sites, create temporary preview channels with expiration, and clone preview versions to production. - Local Emulation: Test hosting behavior locally with the Firebase emulator before deploying. - Use Case: You have a React SPA built into a dist folder. Use this Skill to configure SPA rewrites, deploy to a preview channel for review, then clone the verified version to your live site. ## Quick Start Ask the AI to configure firebase.json for a single-page app and deploy it to a Firebase Hosting preview channel.

Frequently Asked Questions about firebase-hosting-basics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a static site to Firebase Hosting?

Deploy to Firebase Hosting by running npx firebase-tools deploy --only hosting after configuring the public directory in firebase.json. This publishes your content to PROJECT_ID.web.app and PROJECT_ID.firebaseapp.com on a global CDN with built-in SSL.

How to set up SPA rewrites in firebase.json?

Configure SPA rewrites by adding a rewrites rule with source "**" and destination "/index.html" in the hosting section of firebase.json. This serves your index.html for all routes, enabling client-side routing for React or Vue apps.

Firebase Hosting vs Firebase App Hosting, which should I use?

Use Firebase Hosting for static sites and simple SPAs without server-side rendering, where you control builds via CLI. Choose Firebase App Hosting for full-stack frameworks like Next.js or Angular that need SSR, ISR, or git-push-to-deploy automation.

How do I preview changes before deploying to live Firebase Hosting?

Deploy to a preview channel with npx firebase-tools hosting:channel:deploy CHANNEL_ID, which returns a temporary URL. Channels expire after 7 days by default, and you can clone a verified preview version to live with hosting:clone.

Can I test Firebase Hosting locally before deploying?

Yes, run npx firebase-tools emulators:start --only hosting to serve your app locally at http://localhost:5000. This emulates hosting behavior including your firebase.json configuration without deploying to production.