File hashes for cache-busting using the CLI #8236
NoelDeMartin
started this conversation in
Ideas
Replies: 2 comments 4 replies
-
did you find a solution for it? |
Beta Was this translation helpful? Give feedback.
3 replies
-
I dont no much about css caching but I don’t think that’ll be necessary cause tailwind will always have to go through your code base to have new utility classes to add to the bundled styles.css file. So I think caching may be unnecessary here. caching is a good feature but I don’t thing it will be needed in this scenario |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently started a new project that requires very little JS, so I'm not using any bundler like webpack or vite. So I thought this would be the perfect time to start using the standalone CLI. It worked great, but after a while I realized... what about cache busting?
I didn't find it mentioned anywhere in the docs o searching around, so I wonder if I'm missing something here. But how would you go about distributing assets generated by the CLI? All examples I see use a static name like
main.css
, but as soon as the contents change, that could result in some bad UX for returning visitors.I was thinking that maybe it would be nice to support a syntax such as this (similar to how it is done in webpack):
Even if that works, it's still necessary to manually change the name in the html file. Maybe it would make sense to generate a file similar to the mix-manifest from laravel mix, or copying an
index.html
from a template (similar to what bundlers do).But maybe I'm just overthinking this and there is an easier way, maybe using some existing tools. Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions