You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent a bit of time on a new site running the latest Bridgetown 2.0 beta and Tailwind 4.0 beta 1. In order to support the new fast refresh feature, we need a way to hook into a site's post_write event and, if on the fast refresh path, trigger the Tailwind JIT refresh.
This is best I could get it for now. Maybe folks can play around with the concept some more. Basically fast refresh happens first and you get a browser reload right away, which is good for normal content updates, and then there's a full refresh shortly thereafter. It does mean there can be a "flash of not yet Tailwind-generated styling" as you're playing around with element classes though. I'm not really sure how to make it smoother, but at least it works. I also thought of the idea of having a --skip-tw-jit CLI option, so when you know you're just working on content and not styling per se, you can skip the extra refresh entirely.
I spent a bit of time on a new site running the latest Bridgetown 2.0 beta and Tailwind 4.0 beta 1. In order to support the new fast refresh feature, we need a way to hook into a site's post_write event and, if on the fast refresh path, trigger the Tailwind JIT refresh.
This is best I could get it for now. Maybe folks can play around with the concept some more. Basically fast refresh happens first and you get a browser reload right away, which is good for normal content updates, and then there's a full refresh shortly thereafter. It does mean there can be a "flash of not yet Tailwind-generated styling" as you're playing around with element classes though. I'm not really sure how to make it smoother, but at least it works. I also thought of the idea of having a
--skip-tw-jit
CLI option, so when you know you're just working on content and not styling per se, you can skip the extra refresh entirely.The text was updated successfully, but these errors were encountered: