tailwind icon indicating copy to clipboard operation
tailwind copied to clipboard

Variables not updating with HMR

Open DamianoMagrini opened this issue 4 months ago • 0 comments

It seems like theme variables do not update if the code is updated during a ns run or ns debug session with HMR enabled (as it is by default). I only tested it on Android on a Windows machine with nativescript 8.9.3, @nativescript/core 8.9.7, @nativescript/android 8.9.1, @nativescript/tailwind 4.0.4, and tailwindcss 4.1.13.

How to reproduce

For example, clone ns-tailwind-4-examples, pick any example/framework, and run it with ns run android or ns debug android. Update the code for the home page replacing text-sky-500 with text-amber-500 and see the color disappear.

Notes

Notably, if run with --no-hmr (i.e. the app restarts at each change), theme variables are reloaded correctly.

I believe it is an issue with variables because, for example, updating a spacing class to an arbitrary size (e.g. mx-2 to mx-123) works.

DamianoMagrini avatar Sep 06 '25 09:09 DamianoMagrini