Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/suciptoid/adapter-firebase-function
https://github.com/suciptoid/adapter-firebase-function
Last synced: about 13 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/suciptoid/adapter-firebase-function
- Owner: suciptoid
- Created: 2021-05-06T04:36:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-18T15:34:07.000Z (over 3 years ago)
- Last Synced: 2024-10-06T03:57:41.061Z (about 1 month ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"
}
}
```