Replies: 3 comments
-
|
I'm encountering the same issue, but restarting the expo dev server is not enough for me, it looks like I need to clear the cache as well. Anything new about the root cause or workaround? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
i think this should be an issue instead of a discussion |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Remove the config.cacheStores = [
new FileStore({
root: path.join(__dirname, "node_modules", ".cache", "metro"),
}),
]; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Title: Tailwind v4 + NativeWind v5: HMR doesn’t pick up new classes in Expo app unless they existed at build time
Hi 👋
I’m running into a Hot Module Reloading issue with the Expo app generated from this repo when using Tailwind CSS v4 + NativeWind v5.
Context
t3-oss/create-t3-turbo(Expo app inapps/expo)src/styles.csssetupWhat I’m seeing
When I add a new Tailwind class to a component in the Expo app, HMR doesn’t apply the new style unless that class was already present somewhere at build time.
Example:
Start dev server from repo root:
Open
apps/expo/src/app/index.tsx(or any screen) and add a brand-new Tailwind utility, e.g. change:to:
Save the file.
Expected behavior
Expo + NativeWind HMR should pick up the new Tailwind class (
border-4 border-red-500) and update the UI immediately, without needing to restart the dev server.Actual behavior
The component re-renders, but the new Tailwind class is ignored:
So it feels like the Tailwind transform only “sees” classes that were present when the dev server first started, and isn’t re-scanning files properly for new ones during HMR.
Notes / Workarounds
Questions
@sourcesetup, Tailwind/Metro integration, etc.) that would make Tailwind re-scan classes on HMR for the Expo app?@source inline, etc.) you’d recommend for this repo specifically?Beta Was this translation helpful? Give feedback.
All reactions