Closed KyleJune closed 3 months ago
Alternatively, update the deploy github action to preserve build artifacts to deploy with new builds. That would probably be easier. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/storing-workflow-data-as-artifacts#uploading-build-and-test-artifacts
Decided to do this instead https://github.com/udibo/react-app/pull/98
Currently with code splitting, users that load the site before a deployment may experience errors when navigating to pages they haven't visited before. That's because the new deployment's build artifact names may have changed or been removed. The new build wouldn't have the previous builds artifacts available.
To fix that, I want to use deno kv and cron to ensure there are copies available for a set amount of time. This feature should be easy to disable or reconfigure. Frequency of caching and changing how long cached entries are kept are examples of configuration options people might want. Those that deploy less frequently might want less agressive caching.