Firebase config for Nuxt.js static site (nuxt generate). Includes cache-headers for hashed assets.
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*"
],
"headers": [
{
"source": "/**",
"headers": [{
"key": "Cache-Control",
"value": "no-cache"
}]
},
{
"source" : "_nuxt/**/*.@(css)",
"headers" : [
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key" : "Cache-Control",
"value" : "public, max-age=31536000, immutable"
}
]
},
{
"source" : "_nuxt/**/*.@(js)",
"headers" : [
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key" : "Cache-Control",
"value" : "public, max-age=31536000, immutable"
}
]
},
{
"source" : "_nuxt/**/*.@(svg|jpg|jpeg|gif|png)",
"headers" : [{
"key" : "Cache-Control",
"value" : "public, max-age=31536000, immutable"
}]
}
],
"cleanUrls": true
}
}