Last active
September 9, 2021 18:39
-
-
Save dbredvick/a0cdd4fd7fd803de087e70d961eb9e79 to your computer and use it in GitHub Desktop.
create-react-app caching on Vercel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"headers": [ | |
{ | |
"source": "/static/:slug*", | |
"headers": [ | |
{ | |
"key": "Cache-Control", | |
"value": "max-age=31536000" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to configure create-react-app when deployed on Vercel, add the following
headers
config to yourvercel.json
file. Config per the docs: https://create-react-app.dev/docs/production-build/#static-file-caching