Skip to content

Instantly share code, notes, and snippets.

@Scarygami
Last active September 12, 2017 18:51
Show Gist options
  • Save Scarygami/32f33ec847b88ceac65eaefdcdb3c29d to your computer and use it in GitHub Desktop.
Save Scarygami/32f33ec847b88ceac65eaefdcdb3c29d to your computer and use it in GitHub Desktop.
firebase.json for differential serving
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "/",
"function": "serve"
}, {
"source": "**/!(*.js|*.html|*.css|*.json|*.svg|*.png|*.jpg|*.jpeg)",
"function": "serve"
}
],
"headers": [{
"source": "**/service-worker.js",
"headers": [{
"key": "Service-Worker-Allowed",
"value": "/"
}]
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment