Skip to content

Commit 05d1db4

Browse files
committed
docs(nuxt): deployment
1 parent 8976baa commit 05d1db4

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

docs/nuxt/deployment.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
1-
# Nuxt VueFire Config
1+
# Deployment
2+
3+
It is recommended not to SSR every route in your application. Instead, you should only SSR or SSG (generate at build) the routes that are critical for SEO and performance. For example, you can SSG the homepage and the product pages, but not the cart page or profile pages.
4+
5+
You can achieve this by combining the [`prerender` option for nitro](https://nuxt.com/docs/getting-started/deployment#manual-pre-rendering):
6+
7+
```ts{4-6}
8+
// nuxt.config.ts
9+
defineNuxtConfig({
10+
nitro: {
11+
prerender: {
12+
routes: ['/', '/products'],
13+
},
14+
},
15+
//
16+
})
17+
```
18+
19+
## Spark plan
20+
21+
The Spark plan is a free plan that enable most of firebase functions. With this plan, you want to **prerender your app and deploy it as a static site**. In order to do this, make sure **not to apply the Firebase preset** when bundling your app and to use the `generate` command:
22+
23+
```bash
24+
nuxt generate
25+
```
26+
27+
You can then let your CI deploy your app to Firebase or do it manually:
28+
29+
```bash
30+
firebase deploy
31+
```
32+
33+
## Blaze plan
234

335
::: warning
4-
The Nuxt VueFire module is still a work in progress and it might contain breaking changes in the future. The SSR is only partially supported. If you find any issues, please open an issue on GitHub.
36+
The Firebase preset is still experimental. It is not recommended to use it in production.
537
:::
38+
39+
The Blaze plan is a pay-as-you-go that allows you to run Firebase Functions. It's free up to a certain amount of requests. With this plan, you can either do the same as with the [Spark plan](#spark-plan) (cheaper) or build with the Firebase preset and deploy your app as a serverless function:
40+
41+
```bash
42+
NITRO_PRESET=firebase nuxt build
43+
```

0 commit comments

Comments
 (0)