Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/suciptoid/adapter-firebase-function


https://github.com/suciptoid/adapter-firebase-function

Last synced: about 13 hours ago
JSON representation

Awesome Lists containing this project

README

        

# SvelteKit Firebase Function Adapter

This is just a copy / adapted version of [Official Vercel Adapter](https://github.com/sveltejs/kit/tree/master/packages/adapter-vercel) to make working with firebase **function & hosting**.

**⚠️DISCLAIMER: Do with your own risk!⚠️**

## Install
```
npm install adapter-firebase-function
```

## Usage

```
// svelte.config.js
...
import firebase from 'adapter-firebase-function'
...

...
target: '#svelte',
adapter: firebase()
...
```

### Options

| options | default |
|---------|---------|
| minify | false |

Add `firebase({ minify: true })` to reduce output file size

### Build
```
npm run build
```

### Firebase Config
Minimal firebase config, auto generated if not exists
```
{
"hosting": {
"public": "public",
"rewrites": [
{
"source": "**",
"function": "ssr"
}
]
},
"functions": {
"predeploy": [],
"source": "functions",
"runtime": "nodejs12"
}
}
```