|
2 | 2 |
|
3 | 3 | > Deploy Nitro apps to Firebase hosting.
|
4 | 4 |
|
5 |
| -::note |
6 |
| -You will need to be on the [**Blaze plan**](https://firebase.google.com/pricing) (Pay as you go) to get started. |
7 |
| -:: |
8 |
| - |
9 | 5 | <!--
|
10 | 6 |
|
11 | 7 | ## Firebase app hosting <sup>(beta)</sup>
|
@@ -42,9 +38,8 @@ You can integrate with this provider using [zero configuration](/deploy/#zero-co
|
42 | 38 |
|
43 | 39 | :read-more{title="Firebase Hosting" to="https://firebase.google.com/docs/hosting"}
|
44 | 40 |
|
45 |
| -::important |
46 |
| -This preset will deploy to firebase functions 1st gen by default. If you want to deploy to firebase functions 2nd gen, see the [instructions below](#using-2nd-generation-firebase-functions). |
47 |
| -:: |
| 41 | +> [!NOTE] |
| 42 | +> This preset uses [2nd gen](https://firebase.google.com/docs/functions/version-comparison#new-in-2nd-gen) firebase cloud functions |
48 | 43 |
|
49 | 44 | ### Project Setup
|
50 | 45 |
|
@@ -144,78 +139,6 @@ If you installed the Firebase CLI globally, you can also run:
|
144 | 139 | firebase deploy
|
145 | 140 | ```
|
146 | 141 |
|
147 |
| -### Using 2nd generation firebase functions |
148 |
| - |
149 |
| -- [Comparison between 1st and 2nd generation functions](https://firebase.google.com/docs/functions/version-comparison) |
150 |
| - |
151 |
| -To switch to the more recent and, recommended generation of firebase functions, set the `firebase.gen` option to `2`: |
152 |
| - |
153 |
| -::code-group |
154 |
| - |
155 |
| -```ts{3} [nitro.config.ts] |
156 |
| -export default defineNitroConfig({ |
157 |
| - firebase: { |
158 |
| - gen: 2 |
159 |
| - // ... |
160 |
| - } |
161 |
| -}) |
162 |
| -``` |
163 |
| - |
164 |
| -```ts{4} [nuxt.config.ts] |
165 |
| -export default defineNuxtConfig({ |
166 |
| - nitro: { |
167 |
| - firebase: { |
168 |
| - gen: 2 |
169 |
| - // ... |
170 |
| - } |
171 |
| - } |
172 |
| -}) |
173 |
| -``` |
174 |
| - |
175 |
| -:: |
176 |
| - |
177 |
| -::note |
178 |
| -If you cannot use configuration for any reason, alternatively you can use `NITRO_FIREBASE_GEN` environment variable. |
179 |
| -:: |
180 |
| - |
181 |
| -If you already have a deployed version of your website and want to upgrade to 2nd gen, [see the Migration process on Firebase docs](https://firebase.google.com/docs/functions/2nd-gen-upgrade). Namely, the CLI will ask you to delete your existing functions before deploying the new ones. |
182 |
| - |
183 |
| -### Options |
184 |
| - |
185 |
| -You can set options for the firebase functions in your `nitro.config.ts` file: |
186 |
| - |
187 |
| -::code-group |
188 |
| - |
189 |
| -```ts [nitro.config.ts] |
190 |
| -export default defineNitroConfig({ |
191 |
| - firebase: { |
192 |
| - gen: 2, |
193 |
| - httpsOptions: { |
194 |
| - region: 'europe-west1', |
195 |
| - maxInstances: 3, |
196 |
| - }, |
197 |
| - }, |
198 |
| -}); |
199 |
| -``` |
200 |
| - |
201 |
| -```ts [nuxt.config.ts] |
202 |
| -export default defineNuxtConfig({ |
203 |
| - nitro: { |
204 |
| - firebase: { |
205 |
| - gen: 2, |
206 |
| - httpsOptions: { |
207 |
| - region: 'europe-west1', |
208 |
| - maxInstances: 3, |
209 |
| - }, |
210 |
| - }, |
211 |
| - }, |
212 |
| -}); |
213 |
| -``` |
214 |
| - |
215 |
| -:: |
216 |
| - |
217 |
| -You can also set options for 1st generation Cloud Functions if the `gen` option is set to `1`. Note these are different from the options for 2nd generation Cloud Functions. |
218 |
| - |
219 | 142 | #### Runtime Node.js version
|
220 | 143 |
|
221 | 144 | You can set custom Node.js version in configuration:
|
|
0 commit comments