diff --git a/src/frameworks/docs/lit.md b/src/frameworks/docs/lit.md new file mode 100644 index 00000000000..f020bede473 --- /dev/null +++ b/src/frameworks/docs/lit.md @@ -0,0 +1,3 @@ +# Integrate Lit + +Lit support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance. \ No newline at end of file diff --git a/src/frameworks/docs/preact.md b/src/frameworks/docs/preact.md new file mode 100644 index 00000000000..6be4f313eb0 --- /dev/null +++ b/src/frameworks/docs/preact.md @@ -0,0 +1,3 @@ +# Integrate Preact + +Preact support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance. \ No newline at end of file diff --git a/src/frameworks/docs/react.md b/src/frameworks/docs/react.md index 7c0242c2a71..4cc7807432f 100644 --- a/src/frameworks/docs/react.md +++ b/src/frameworks/docs/react.md @@ -1,50 +1,3 @@ # Integrate React -Using the Firebase CLI, you can deploy your React static web apps to Firebase -and serve them with Firebase Hosting. - -Note: Framework-aware Hosting is an early public preview. This means -that the functionality might change in backward-incompatible ways. A preview -release is not subject to any SLA or deprecation policy and may receive limited -or no support. - -## Before you begin - -Before you get started deploying your app to Firebase, -review the following requirements and options: - -- Firebase CLI version 12.1.0 or later. Make sure to - [install the CLI](/docs/cli#install_the_firebase_cli) using your preferred - method. -- Optional: An existing React project using Vite. You can create one with - `npm create vite@latest -- --template react` or let the Firebase CLI - [initialize a new project](#initialize-a-new-project) for you. - - -## Initialize Firebase - -To get started, initialize Firebase for your framework project. -Use the Firebase CLI for a new project, or modify `firebase.json` for an -existing project. - -### Initialize a new project - -1. In the Firebase CLI, enable the web frameworks preview: -
firebase experiments:enable webframeworks-1. Run the initialization command from the CLI and then follow the prompts: -
firebase init hosting-1. Answer yes to "Do you want to use a web framework? (experimental)" -1. Choose your hosting source directory. If there is an existing React - codebase (with Vite), the CLI detects it and the process completes. - -## Serve static content - -After initializing Firebase, you can serve static content with the standard -deployment command: - -```shell -firebase deploy -``` - -You can [view your deployed app](/docs/hosting/test-preview-deploy#view-changes) -on its live site. +React support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance. \ No newline at end of file diff --git a/src/frameworks/docs/svelte.md b/src/frameworks/docs/svelte.md new file mode 100644 index 00000000000..9f1b75003b1 --- /dev/null +++ b/src/frameworks/docs/svelte.md @@ -0,0 +1,3 @@ +# Integrate Svelte + +Svelte support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance. \ No newline at end of file diff --git a/src/frameworks/docs/vite.md b/src/frameworks/docs/vite.md new file mode 100644 index 00000000000..181bf85efcd --- /dev/null +++ b/src/frameworks/docs/vite.md @@ -0,0 +1,51 @@ +# Integrate Vite + +Using the Firebase CLI, you can deploy your Vite-powered sites to Firebase +and serve them with Firebase Hosting. The following instructions also apply +to React, Preact, Lit, and Svelte as they are built on the Vite integration. + +Note: Framework-aware Hosting is an early public preview. This means +that the functionality might change in backward-incompatible ways. A preview +release is not subject to any SLA or deprecation policy and may receive limited +or no support. + +## Before you begin + +Before you get started deploying your app to Firebase, +review the following requirements and options: + +- Firebase CLI version 12.1.0 or later. Make sure to + [install the CLI](https://firebase.google.com/docs/cli#install_the_firebase_cli) using your preferred + method. +- Optional: An existing Vite project. You can create one with + `npm create vite@latest` or let the Firebase CLI + initialize a new project for you. + + +## Initialize Firebase + +To get started, initialize Firebase for your framework project. +Use the Firebase CLI for a new project, or modify `firebase.json` for an +existing project. + +### Initialize a new project + +1. In the Firebase CLI, enable the web frameworks preview: +
firebase experiments:enable webframeworks+1. Run the initialization command from the CLI and then follow the prompts: +
firebase init hosting+1. Answer yes to "Do you want to use a web framework? (experimental)" +1. Choose your hosting source directory. If there is an existing Vite codebase, + the CLI detects it and the process completes. + +## Serve static content + +After initializing Firebase, you can serve static content with the standard +deployment command: + +```shell +firebase deploy +``` + +You can [view your deployed app](https://firebase.google.com/docs/hosting/test-preview-deploy#view-changes) +on its live site.