This repository was archived by the owner on May 10, 2021. It is now read-only.
This repository was archived by the owner on May 10, 2021. It is now read-only.
Generate _headers file #110
Closed
Description
Is your feature request related to a problem? Please describe.
Assets under /_next/static/chunks
are always immutable. They can be cached by the browser forever, without having to re-validate their content. Netlify's default cache-control header is not optimal for those assets, however, it can be overriden with a _headers file.
Describe the solution you'd like
Add a new step that generates a _headers file and overrides the cache control for /_next/static/chunks
. This can be acomplished with this rule:
/_next/static/chunks/*:
cache-control: public,max-age=31536000,immutable
See the reference in our docs: https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file
Describe alternatives you've considered
We can leave it as it is.