-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add Vite and related frameworks readme #6289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8386de5
add svelte.md
307706e
consolidate to vite.md
17c4427
pr comments
f3d1e5f
Merge branch 'master' into austincrim_svelte-docs
02f5c32
Merge branch 'master' into austincrim_svelte-docs
e87f756
Merge branch 'master' into austincrim_svelte-docs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Integrate Lit | ||
|
||
Lit support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Integrate Preact | ||
|
||
Preact support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
<pre class="devsite-terminal">firebase experiments:enable webframeworks</pre> | ||
1. Run the initialization command from the CLI and then follow the prompts: | ||
<pre class="devsite-terminal">firebase init hosting</pre> | ||
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Integrate Svelte | ||
|
||
Svelte support is built on the Vite framework integration. See [vite.md](./vite.md) for full guidance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
<pre class="devsite-terminal">firebase experiments:enable webframeworks</pre> | ||
1. Run the initialization command from the CLI and then follow the prompts: | ||
<pre class="devsite-terminal">firebase init hosting</pre> | ||
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. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.