Skip to content

Repository files navigation

React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the Oxlint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and Oxlint's TypeScript related rules in your project.

Firebase environment setup

Create a local env file from .env.example:

cp .env.example .env.local

Then fill all VITE_FIREBASE_* values with your Firebase Web App config.

Firebase services usage

The app initializes Firebase in src/firebase.js. Reusable services are exported from src/firebase-services.js:

import { auth, db } from './firebase-services'

Auto deploy on commit (GitHub Actions)

Workflow file: .github/workflows/firebase-hosting-deploy.yml

It runs on every push to main, builds the app, and deploys to Firebase Hosting.

Required GitHub repository secrets:

  • VITE_FIREBASE_API_KEY
  • VITE_FIREBASE_AUTH_DOMAIN
  • VITE_FIREBASE_PROJECT_ID
  • VITE_FIREBASE_STORAGE_BUCKET
  • VITE_FIREBASE_MESSAGING_SENDER_ID
  • VITE_FIREBASE_APP_ID
  • FIREBASE_SERVICE_ACCOUNT_PERSONAL_WEBPAGE_2CD1F

To generate the service account secret value:

  1. Open Firebase Console > Project settings > Service accounts.
  2. Click Generate new private key.
  3. Copy the JSON content into GitHub secret FIREBASE_SERVICE_ACCOUNT_PERSONAL_WEBPAGE_2CD1F.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages