Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build a production ready PWA with Angular and Firebase - firebase.json
{
"hosting": {
"public": "www",
"ignore": [
"firebase.json",
"3rdpartylicenses.txt",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source" : "**/*.@(jpg|jpeg|gif|png|svg)",
"headers" : [
{
"key" : "Cache-Control",
"value" : "max-age=86400"
},
{
"key": "Content-Encoding",
"value": "gzip"
}
]
},
{
"source" : "**/*.@(js|css)",
"headers" : [
{
"key" : "Cache-Control",
"value" : "max-age=31536000"
},
{
"key": "Content-Encoding",
"value": "gzip"
}
]
},
{
"source": "**/*-sw.js",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache"
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment