NativeScript / NativeScript/tailwind

Variables not updating with HMR

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
161
Forks
29
Avg merge
1h 39m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the ns-tailwind-4-examples project with an Android ns run or ns debug session and HMR enabled. Compare changing text-sky-500 to text-amber-500 with the same change under --no-hmr; done means theme color variables update without restarting the app.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, tailwindcss
Domain
frontend, mobile-dev, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.