https://www.growthbook.io/ logo
#announcements
Title
# announcements
e

eager-rainbow-87882

10/13/2022, 2:07 PM
Question: How to deal with build time things and feature flags? Context: We are starting a huge UI revamp in our product, and part of it will involve fully new typography, color palettes, etc. We use Tailwind, so the CSS classes regarding those things are defined in build time. But the thing is, loading feature flags is an async process that happen for each user that opens the application. So guys, did anyone get into a situation like this? And if so, is there a simple way to solve this build time things problem, and still being able to turn on/off the feature flag of the revamped UI?
f

future-teacher-7046

10/13/2022, 2:37 PM
Are you using a static site generator?
One approach I've seen for huge rewrites/infrastructure changes is to basically do a Canary deployment. Deploy the new version to a subdomain and route to it at the edge/CDN level based on a feature flag. It's not a long term or super scalable approach, but it's good for testing big changes for a short period of time before committing or rolling back.
m

modern-waiter-38896

10/13/2022, 3:42 PM
@future-teacher-7046 Would this article apply to Erik's question, given your proposed solution above?
e

eager-rainbow-87882

10/13/2022, 3:44 PM
Yeah @future-teacher-7046, we use Nuxt in static mode, that means static generation. I thought about the subdomain trick with an automated redirect based in the feature flag value, but I just felt it would be wrong... I mean, the old application will open for some time while the feature flags are loading, then users will need to wait for the redirect, a very flashy behavior. But maybe it's the unique way really.
f

future-teacher-7046

10/13/2022, 4:04 PM
I would avoid a redirect if you can and instead do the routing at the edge. So the user would see the same URL in their address bar, but the server it would point to would change based on the feature flag.
18 Views