udibo / react-app

A React Framework for Deno that makes it easy to create highly interactive apps that have server side rendering with file based routing for both your UI and API.
https://udibo-react-app.deno.dev/
MIT License
14 stars 2 forks source link

change how builds are served #97

Closed KyleJune closed 3 months ago

KyleJune commented 3 months ago

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.

KyleJune commented 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

KyleJune commented 3 months ago

Decided to do this instead https://github.com/udibo/react-app/pull/98