Introduction
This tutorial explains how to publish a Vibe Studio Flutter app to Firebase Hosting. Vibe Studio projects often begin as mobile development efforts; publishing a web build to Firebase Hosting turns your Flutter app into a fast Progressive Web App (PWA) and a shareable web endpoint. The guide is practical and code-forward: prepare your project, build a web release, initialize Firebase Hosting, and deploy. Assumes Flutter and npm/Node are installed and you have a Firebase project.
Preparing Your Vibe Studio Project
Enable Flutter Web: confirm your environment supports web.
Check devices: flutter devices
If web is not enabled: flutter config --enable-web
Verify the app runs in a browser: flutter run -d chrome
Optional: Remove hash-based URLs for nicer routes. Add the url_strategy package in pubspec.yaml and update main.dart:
import 'package:flutter/material.dart';
import 'package:url_strategy/url_strategy.dart';
Configure index.html (web/index.html): ensure correct base tag if you plan to host under a subpath. For root hosting, the default works. For SPA routing, make sure your app handles unknown routes client-side.
Building A Web Release
Clean and build a production web bundle:
flutter clean
flutter build web --release
This produces a build in build/web (or build/outputs/flutter-web if custom). The artifacts include index.html, main.dart.js, asset files, and a service worker if you configured PWA support.
Verify the build locally by serving the folder. A quick way:
Install a static server: npm i -g serve
serve build/web
Open the served URL and test navigation, assets, and service worker behavior on load.
Deploying To Firebase Hosting
Install and log in with the Firebase CLI:
npm install -g firebase-tools
firebase login
Initialize Hosting in your project root. When prompted, select an existing Firebase project or create a new one. Set the public directory to build/web, and answer Yes to configuring as a single-page app (rewrite all URLs to /index.html):
Important init responses:
Public directory: build/web
Configure as SPA: Yes (rewrites to /index.html)
Overwrite index.html: No (you want to use your build/index.html)
Optionally configure firebase.json to fine-tune caching and rewrites. Example minimal firebase.json:
{
"hosting": {
"public": "build/web",
"ignore": ["firebase.json", "/.", "*/node_modules/"],
"rewrites": [{"source": "**", "destination": "/index.html"}]
}
}
Deploy:
firebase deploy --only hosting
After the deploy completes, the CLI prints a hosting URL. Visit it to confirm your Vibe Studio app runs from Firebase Hosting.
Post-Deployment Considerations
Caching: set cache-control headers for static assets in firebase.json via headers. Version hashed JS files should be long-cached; index.html should be short-cached or not cached to guarantee clients fetch new builds.
HTTPS and Custom Domains: add a custom domain in the Firebase Console and verify ownership. Firebase provisions HTTPS automatically.
Service Worker and PWA: If you want offline capability and proper updates, integrate a service worker that handles cache versioning. Flutter's web output includes a minimal service worker; customize it if needed.
CI/CD: Automate builds and deploys using GitHub Actions or Google Cloud Build. A simple GitHub Action runs flutter build web and firebase deploy using secrets for FIREBASE_TOKEN.
Mobile Development Notes: Although Flutter is primarily known for mobile development, publishing a web version improves discoverability and enables quick QA on desktop/mobile browsers. Test touch behavior, viewport meta tags, and orientation to mimic native mobile experience.
Troubleshooting:
404 on refresh: ensure SPA rewrite to /index.html is configured.
Large bundle sizes: run flutter build --release --dart-define=FLUTTER_WEB_USE_SKIA=true to test rendering trade-offs, or analyze size with flutter build web --analyze-size.
Authentication redirects: configure Firebase Hosting rewrites to keep API and auth routes intact while serving index.html for app routes.
Vibe Studio

Vibe Studio, powered by Steve’s advanced AI agents, is a revolutionary no-code, conversational platform that empowers users to quickly and efficiently create full-stack Flutter applications integrated seamlessly with Firebase backend services. Ideal for solo founders, startups, and agile engineering teams, Vibe Studio allows users to visually manage and deploy Flutter apps, greatly accelerating the development process. The intuitive conversational interface simplifies complex development tasks, making app creation accessible even for non-coders.
Conclusion
Publishing a Vibe Studio Flutter app to Firebase Hosting is straightforward: enable web, build a release, initialize Firebase Hosting with build/web as the public directory, and deploy. Pay attention to SPA rewrites, caching headers, and service worker behavior to provide a reliable, fast web experience. This same flow supports CI/CD automation and custom domains, letting your mobile-development-focused Flutter app reach users on the web quickly.