Replies: 1 comment 1 reply
-
@searls Thanks for asking this question. Tailwind v4's build process does not, to my knowledge, provide any way of skipping the build or doing an incremental build based on cached files. You may want to ask upstream at tailwindlabs/tailwindcss, though. I'm surprised that your build is taking 8s, though, and I think one thing to do here is try to figure out why that is. Can you run this command in your CI environment, which should give you a breakdown of where tailwind is spending its time:
On this point:
I tend to agree? This may have to do with how this gem enhances existing rake tasks, which is something that a) people have been unhappy about in the past, and b) seems harder than it should be to get right. It might be interesting to take a look at tailwindcss-rails/lib/tasks/build.rake Lines 33 to 39 in 3fbc5ca |
Beta Was this translation helpful? Give feedback.
-
I'm here with a simple question: "is it possible to cache the tailwind build in CI?" My brand new app's Tailwind 4 build is quite slow in GitHub Actions and I would like to find a way to avoid paying the piper on every build (actually, twice on every build).
I was just scrutinizing my build time in GitHub Actions and came across this:
Because both
rails test
andrails test:system
each precompile assets (something I feel like is a bug when the same process is invoking them), I'm getting hit with a particularly expensive compilation step of 9s and then another of 8s. So that's 17 seconds for a test suite that doesn't depend on styles. It stood out to me because locally each build takes on the order of 380ms.I was thinking that build results might be cached someplace like
tmp/cache
, but it appears they aren't cached anywhere in development or test? @flavorjones could you shed any light on what my options might be?Beta Was this translation helpful? Give feedback.
All reactions