Skip to content

Commit 5e9c8b5

Browse files
author
Austin Crim
authored
add Vite and related frameworks readme (#6289)
* add svelte.md * consolidate to vite.md * pr comments
1 parent 84c5ba6 commit 5e9c8b5

File tree

5 files changed

+61
-48
lines changed

5 files changed

+61
-48
lines changed

src/frameworks/docs/lit.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Integrate Lit
2+
3+
Lit support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance.

src/frameworks/docs/preact.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Integrate Preact
2+
3+
Preact support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance.

src/frameworks/docs/react.md

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,3 @@
11
# Integrate React
22

3-
Using the Firebase CLI, you can deploy your React static web apps to Firebase
4-
and serve them with Firebase Hosting.
5-
6-
Note: Framework-aware Hosting is an early public preview. This means
7-
that the functionality might change in backward-incompatible ways. A preview
8-
release is not subject to any SLA or deprecation policy and may receive limited
9-
or no support.
10-
11-
## Before you begin
12-
13-
Before you get started deploying your app to Firebase,
14-
review the following requirements and options:
15-
16-
- Firebase CLI version 12.1.0 or later. Make sure to
17-
[install the CLI](/docs/cli#install_the_firebase_cli) using your preferred
18-
method.
19-
- Optional: An existing React project using Vite. You can create one with
20-
`npm create vite@latest -- --template react` or let the Firebase CLI
21-
[initialize a new project](#initialize-a-new-project) for you.
22-
23-
24-
## Initialize Firebase
25-
26-
To get started, initialize Firebase for your framework project.
27-
Use the Firebase CLI for a new project, or modify `firebase.json` for an
28-
existing project.
29-
30-
### Initialize a new project
31-
32-
1. In the Firebase CLI, enable the web frameworks preview:
33-
<pre class="devsite-terminal">firebase experiments:enable webframeworks</pre>
34-
1. Run the initialization command from the CLI and then follow the prompts:
35-
<pre class="devsite-terminal">firebase init hosting</pre>
36-
1. Answer yes to "Do you want to use a web framework? (experimental)"
37-
1. Choose your hosting source directory. If there is an existing React
38-
codebase (with Vite), the CLI detects it and the process completes.
39-
40-
## Serve static content
41-
42-
After initializing Firebase, you can serve static content with the standard
43-
deployment command:
44-
45-
```shell
46-
firebase deploy
47-
```
48-
49-
You can [view your deployed app](/docs/hosting/test-preview-deploy#view-changes)
50-
on its live site.
3+
React support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance.

src/frameworks/docs/svelte.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Integrate Svelte
2+
3+
Svelte support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance.

src/frameworks/docs/vite.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Integrate Vite
2+
3+
Using the Firebase CLI, you can deploy your Vite-powered sites to Firebase
4+
and serve them with Firebase Hosting. The following instructions also apply
5+
to React, Preact, Lit, and Svelte as they are built on the Vite integration.
6+
7+
Note: Framework-aware Hosting is an early public preview. This means
8+
that the functionality might change in backward-incompatible ways. A preview
9+
release is not subject to any SLA or deprecation policy and may receive limited
10+
or no support.
11+
12+
## Before you begin
13+
14+
Before you get started deploying your app to Firebase,
15+
review the following requirements and options:
16+
17+
- Firebase CLI version 12.1.0 or later. Make sure to
18+
[install the CLI](https://firebase.google.com/docs/cli#install_the_firebase_cli) using your preferred
19+
method.
20+
- Optional: An existing Vite project. You can create one with
21+
`npm create vite@latest` or let the Firebase CLI
22+
initialize a new project for you.
23+
24+
25+
## Initialize Firebase
26+
27+
To get started, initialize Firebase for your framework project.
28+
Use the Firebase CLI for a new project, or modify `firebase.json` for an
29+
existing project.
30+
31+
### Initialize a new project
32+
33+
1. In the Firebase CLI, enable the web frameworks preview:
34+
<pre class="devsite-terminal">firebase experiments:enable webframeworks</pre>
35+
1. Run the initialization command from the CLI and then follow the prompts:
36+
<pre class="devsite-terminal">firebase init hosting</pre>
37+
1. Answer yes to "Do you want to use a web framework? (experimental)"
38+
1. Choose your hosting source directory. If there is an existing Vite codebase,
39+
the CLI detects it and the process completes.
40+
41+
## Serve static content
42+
43+
After initializing Firebase, you can serve static content with the standard
44+
deployment command:
45+
46+
```shell
47+
firebase deploy
48+
```
49+
50+
You can [view your deployed app](https://firebase.google.com/docs/hosting/test-preview-deploy#view-changes)
51+
on its live site.

0 commit comments

Comments
 (0)