Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically add sha to static artifacts #141

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

piercefreeman
Copy link
Owner

@piercefreeman piercefreeman commented Nov 26, 2024

Websites typically want aggressive caching policies on their static directory, since support files like css/js only change during a deployment of a new version. While it's possible to handle this in other ways (ie. 304 Not Modified) it's cleaner to handle this at the framework level. The new logic in this PR will analyze the _static folder at build time, cache the current version of the file sha, and inject this into any LinkAttributes that import this file.

Closes out #133

@piercefreeman piercefreeman merged commit 1260d0b into main Nov 26, 2024
17 checks passed
@piercefreeman piercefreeman deleted the feature/hash-static-files branch November 26, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant