Skip to content

fix: collect custom template attributes in source candidates#980

Merged
sonofmagic merged 1 commit into
mainfrom
codex/issue-977
Jul 9, 2026
Merged

fix: collect custom template attributes in source candidates#980
sonofmagic merged 1 commit into
mainfrom
codex/issue-977

Conversation

@sonofmagic

Copy link
Copy Markdown
Owner

Summary

  • Fix Tailwind CSS v4 @source source-candidate collection to reuse configured customAttributes, so component props such as t-class and t-class-* can generate CSS.
  • Pass custom template attribute settings into Vite, Gulp, and Webpack source candidate collectors.
  • Include custom attribute settings in the source candidate content cache key to avoid stale cross-config reuse.
  • Add a Chinese patch changeset for weapp-tailwindcss.

Fixes #977.

Tests

  • pnpm --filter weapp-tailwindcss exec vitest run test/bundlers/vite-source-candidates.unit.test.ts
  • pnpm --filter weapp-tailwindcss exec vitest run test/bundlers/vite-source-candidates.unit.test.ts test/bundlers/webpack.v5.unit/source-candidate-cache.test.ts
  • git diff --check

Notes

  • pnpm --filter weapp-tailwindcss run build:tsc was attempted, but the current workspace fails on existing e2e/tools files outside the package rootDir and unrelated exact-optional-property type errors before reaching this change.

@changeset-bot

changeset-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c964ca3

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

This PR includes changesets to release 3 packages
Name Type
weapp-tailwindcss Patch
@weapp-tailwindcss/build-all Patch
@weapp-tailwindcss/website Patch

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 78be882 into main Jul 9, 2026
46 checks passed
@sonofmagic sonofmagic mentioned this pull request Jul 9, 2026
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.

[Bug]: 使用 TDesign 组件库时,t-class 属性中的 Tailwind 类没有被处理

1 participant