Skip to content

Instantly share code, notes, and snippets.

@onderceylan
Created January 26, 2019 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onderceylan/772e645e95c24b955147276b6fe49965 to your computer and use it in GitHub Desktop.
Save onderceylan/772e645e95c24b955147276b6fe49965 to your computer and use it in GitHub Desktop.
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