Skip to content

fix(vite): 修复 uni-app x 模块图 variant 候选 - #1092

Merged
sonofmagic merged 1 commit into
mainfrom
codex/issue-1091
Aug 20, 2026
Merged

fix(vite): 修复 uni-app x 模块图 variant 候选#1092
sonofmagic merged 1 commit into
mainfrom
codex/issue-1091

Conversation

@sonofmagic

Copy link
Copy Markdown
Owner

问题原因

uni-app x 开启页面或组件局部样式时,普通 utility 会通过局部 @apply 生成,但 variant utility 仍依赖全局 Tailwind 生成。已进入 Vite 模块图、却未命中显式正向 @source 的页面候选会被过滤,导致 dark:bg-[#3498db] 已转译但缺少对应全局样式。

修复内容

  • 为共享候选仓库增加活跃模块图候选层,并纳入快照与恢复。
  • 活跃模块可跨过正向 @source 缺口,但显式负向 @source not 与分包排除仍优先。
  • uni-app x 在局部样式转译前登记并经 Tailwind 生成器校验候选,同步供模板转译和全局 CSS 生成使用。
  • 增加模块范围、排除规则、快照恢复和无效 utility 校验回归测试。
  • 增加 weapp-tailwindcss patch change intent。

验证

  • pnpm --filter weapp-tailwindcss test(3201 passed,29 skipped)
  • pnpm --filter weapp-tailwindcss lint
  • pnpm --filter weapp-tailwindcss build
  • pnpm change status

Refs #1091

@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c3cddc5

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sonofmagic
sonofmagic merged commit 79b1a02 into main Aug 20, 2026
100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant