NativeScript / NativeScript/tailwind
Variables not updating with HMR
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 161
- 派生
- 29
- 平均合并
- 1 小时 39 分钟
- 30 天内合并 PR
- 1
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在启用 HMR 的 Android ns run 或 ns debug 会话中,于 ns-tailwind-4-examples 项目复现该问题。将 text-sky-500 改为 text-amber-500,并与在 --no-hmr 下进行相同更改的结果进行比较;当主题颜色变量无需重启应用即可更新时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, tailwindcss
- 领域
- frontend, mobile-dev, tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100