Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/hbuilderx-windows-discovery-retry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@weapp-tailwindcss/hbuilderx-runner": patch
---

Windows 上 HBuilderX 进程探测在 PowerShell 冷启动超时时重试,单次失败不再把瞬时超时当成探测失败。
22 changes: 22 additions & 0 deletions .changeset/wide-cobras-open.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
"weapp-tailwindcss": patch
"@weapp-tailwindcss/postcss": patch
"@weapp-tailwindcss/ui": patch
---

修复 graph 生成结果在样式最终化后丢失编译 snapshot、组件样式去重后残留无消费者的 content 初始化(保留根样式与增量生成的默认初始化契约)、Vite 对象钩子及其上下文和构建参数未完整转发的问题。修复 Webpack 样式入口读取错误的运行时配置字段,以及 Tailwind v4 候选校验未使用裸任意值配置的问题。

统一内部处理器、只读生成结果和跨构建器类型契约,校验框架分包配置及单 Root AST 返回边界,保留同步与异步 HMR 源码读取能力;Uni App X 通过 Rollup 接受的 JSON source map 保留完整来源信息。

修复作者样式回填时 Tailwind 编译期函数未展开的问题:复用当前生成源的编译上下文处理函数值,保留重复声明、作用域与原有顺序,并拒绝配置上下文歧义,避免正确样式后面残留未编译声明。

修复 UI 样式测试加载构建配置时清空发布产物的问题:配置求值不再触发嵌套构建,样式由 weapp-tailwindcss 生成,JS 与声明文件由 tsdown 管理,测试使用内存产物并校验磁盘输出未变化;监听模式保留 CSS、JS 与声明的增量构建。

修复 Uni App X 小程序增量构建中源码样式与框架产物的映射遗漏,保留框架基础样式贡献,并将同目标入口重放与框架输出合并,避免热更新清空全局样式或覆盖页面布局规则。

小程序组件局部样式同时生成基础工具类与变体,保留原变体类身份;作者样式过滤按选择器结构保留包含 Vue 作用域的主题、媒体与伪类展开规则,避免局部背景覆盖主题状态。原生 App 保持现有变体路径。

区分小程序产物导入与 Tailwind 源码依赖,保留框架基础样式 import,避免样式隔离 2.0 编译解析失败;将已有类约束上的 class 属性存在选择器等价转成重复类,保留框架提权效果与小程序兼容性。

修复增量样式回滚时旧规则复活:框架贡献与入口重放不再复用混合产物缓存,最终注入前先更新本轮来源记录,并在原始框架样式转为生成产物时清理旧贡献。源码签名未变时复用干净生成缓存做合并,避免每次热更新都整份重新生成。产物已包含对应 CSS 时跳过 scoped runtime 计算,避免生产全量构建为不会重放的文件做候选签名。
修复 Web 聚合样式替换越过 Tailwind 模块边界而丢失独立导入和组件普通样式的问题,缓存包含真实聚合内容;保留 Web layer 顺序并重放框架 PostCSS 的单位、选择器与前缀转换。插件解析支持相对源码上下文的 CJS/ESM 模块路径和 tuple 选项,保留旧式 transformer 与 Processor 组合,非法或缺失插件明确报错,避免静默省略框架处理。
2 changes: 1 addition & 1 deletion demo/issue-1144-uni-app-x-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
"vite": "^5.4.21",
"weapp-tailwindcss": "workspace:*"
},
"packageManager": "pnpm@11.25.0"
"packageManager": "pnpm@12.4.1"
}
15 changes: 15 additions & 0 deletions demo/uni-app-vite-tailwindcss-v4/src/components/TButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script setup lang="ts">
withDefaults(defineProps<{
tClass?: string
tClassContent?: string
}>(), {
tClass: '',
tClassContent: '',
})
</script>

<template>
<button :class="tClass">
<view :class="tClassContent"><slot /></view>
</button>
</template>
1 change: 1 addition & 0 deletions demo/uni-app-vite-tailwindcss-v4/src/pages/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
import { twMerge } from '@weapp-tailwindcss/merge'
import { weappTwIgnore } from "weapp-tailwindcss/escape"
import HelloWorld from "@/components/HelloWorld.vue"
import TButton from "@/components/TButton.vue"
import { onMounted, ref } from 'vue'

interface WebviewInfoRow {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@
"vite": "^5.4.21",
"weapp-tailwindcss": "workspace:*"
},
"packageManager": "pnpm@11.25.0"
"packageManager": "pnpm@12.4.1"
}
2 changes: 1 addition & 1 deletion demo/uni-app-x-vapor-tailwindcss-v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
"vite": "^5.4.21",
"weapp-tailwindcss": "workspace:*"
},
"packageManager": "pnpm@11.25.0"
"packageManager": "pnpm@12.4.1"
}
2 changes: 1 addition & 1 deletion demo/uni-app-x-vdom-tailwindcss-v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
"vite": "^5.4.21",
"weapp-tailwindcss": "workspace:*"
},
"packageManager": "pnpm@11.25.0"
"packageManager": "pnpm@12.4.1"
}
184 changes: 184 additions & 0 deletions docs/engineering/lessons/local-full-run-contracts.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions e2e/__snapshots__/apps-generator-mode/compare/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -2626,7 +2626,7 @@
],
"status": "passed",
"generator": {
"bytes": 428351,
"bytes": 428411,
"selectors": [
".-translate-y-1",
"._b--watch-hmr-offset_c000089px_B",
Expand Down Expand Up @@ -6682,7 +6682,7 @@
],
"status": "passed",
"generator": {
"bytes": 338549,
"bytes": 338609,
"selectors": [
".before_ccontent-_b_aindependent_subpackage_taro-vite-vue3-tailwindcss-v4_a_B:before",
".before_ccontent-_b_anormal_subpackage_taro-vite-vue3-tailwindcss-v4_a_B:before",
Expand Down Expand Up @@ -8424,7 +8424,7 @@
],
"status": "passed",
"generator": {
"bytes": 53167,
"bytes": 53267,
"selectors": [
"._ebg-_bgray_B",
".after_c_econtent-_b_agood_work_e_a_B:after",
Expand Down
6 changes: 3 additions & 3 deletions e2e/__snapshots__/apps-generator-mode/compare/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ This report is generated by `pnpm e2e:apps-generator`. It builds each retained d
| gulp-tailwindcss-v4 | demo | weapp | `weapp`, `tt` | passed | `gulp-tailwindcss-v4/dist/app.wxss` (+4) | 17828 | 84 | no | no | no | yes | yes | no | no | no | yes |
| mpx-tailwindcss-v4 | demo | wx | `wx`, `ali`, `swan`, `tt`, `dd` | passed | `mpx-tailwindcss-v4/dist/wx/app.wxss` (+9) | 30217 | 183 | no | no | no | yes | yes | no | no | no | yes |
| taro-webpack-react-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | passed | `taro-webpack-react-tailwindcss-v4/dist/app.wxss` (+4) | 322016 | 2222 | no | no | no | yes | yes | no | no | no | yes |
| taro-vite-react-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | passed | `taro-vite-react-tailwindcss-v4/dist/app.wxss` (+6) | 428351 | 2256 | no | no | no | yes | yes | no | no | no | yes |
| taro-vite-react-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | passed | `taro-vite-react-tailwindcss-v4/dist/app.wxss` (+6) | 428411 | 2256 | no | no | no | yes | yes | no | no | no | yes |
| taro-webpack-vue3-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | passed | `taro-webpack-vue3-tailwindcss-v4/dist/app.wxss` (+3) | 239875 | 1723 | no | no | no | yes | yes | no | no | no | yes |
| taro-vite-vue3-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | passed | `taro-vite-vue3-tailwindcss-v4/dist/app.wxss` (+4) | 338549 | 1693 | no | no | no | yes | yes | no | no | no | yes |
| uni-app-vite-tailwindcss-v4 | demo | mp-weixin | `app-android`, `app-ios`, `h5`, `h5:ssr`, `mp-alipay`, `mp-baidu`, `mp-jd`, `mp-kuaishou`, `mp-lark`, `mp-qq`, `mp-toutiao`, `mp-weixin`, `mp-xhs`, `quickapp-webview`, `quickapp-webview-huawei`, `quickapp-webview-union` | passed | `uni-app-vite-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+7) | 53167 | 214 | no | no | no | yes | yes | no | no | no | yes |
| taro-vite-vue3-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | passed | `taro-vite-vue3-tailwindcss-v4/dist/app.wxss` (+4) | 338609 | 1693 | no | no | no | yes | yes | no | no | no | yes |
| uni-app-vite-tailwindcss-v4 | demo | mp-weixin | `app-android`, `app-ios`, `h5`, `h5:ssr`, `mp-alipay`, `mp-baidu`, `mp-jd`, `mp-kuaishou`, `mp-lark`, `mp-qq`, `mp-toutiao`, `mp-weixin`, `mp-xhs`, `quickapp-webview`, `quickapp-webview-huawei`, `quickapp-webview-union` | passed | `uni-app-vite-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+7) | 53267 | 214 | no | no | no | yes | yes | no | no | no | yes |
| weapp-vite-tailwindcss-v4 | demo | weapp | `weapp` | passed | `weapp-vite-tailwindcss-v4/dist/app.wxss` (+3) | 20003 | 123 | no | no | no | yes | yes | no | no | no | yes |
| taro-webpack-react-tailwindcss-v4 | demo | web | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | passed | `taro-webpack-react-tailwindcss-v4/dist` (+4) | 460183 | 2305 | yes | no | yes | yes | yes | no | no | yes | no |
| taro-webpack-react-tailwindcss-v4 | demo | web-compact | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | passed | `taro-webpack-react-tailwindcss-v4/dist` (+4) | 442372 | 2305 | yes | no | yes | yes | yes | no | no | yes | no |
Expand Down
6 changes: 3 additions & 3 deletions e2e/__snapshots__/apps-generator-mode/compare/report.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
| gulp-tailwindcss-v4 | demo | weapp | `weapp`, `tt` | 通过 | `gulp-tailwindcss-v4/dist/app.wxss` (+4) | 17828 | 84 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| mpx-tailwindcss-v4 | demo | wx | `wx`, `ali`, `swan`, `tt`, `dd` | 通过 | `mpx-tailwindcss-v4/dist/wx/app.wxss` (+9) | 30217 | 183 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| taro-webpack-react-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | 通过 | `taro-webpack-react-tailwindcss-v4/dist/app.wxss` (+4) | 322016 | 2222 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| taro-vite-react-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | 通过 | `taro-vite-react-tailwindcss-v4/dist/app.wxss` (+6) | 428351 | 2256 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| taro-vite-react-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | 通过 | `taro-vite-react-tailwindcss-v4/dist/app.wxss` (+6) | 428411 | 2256 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| taro-webpack-vue3-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | 通过 | `taro-webpack-vue3-tailwindcss-v4/dist/app.wxss` (+3) | 239875 | 1723 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| taro-vite-vue3-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | 通过 | `taro-vite-vue3-tailwindcss-v4/dist/app.wxss` (+4) | 338549 | 1693 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| uni-app-vite-tailwindcss-v4 | demo | mp-weixin | `app-android`, `app-ios`, `h5`, `h5:ssr`, `mp-alipay`, `mp-baidu`, `mp-jd`, `mp-kuaishou`, `mp-lark`, `mp-qq`, `mp-toutiao`, `mp-weixin`, `mp-xhs`, `quickapp-webview`, `quickapp-webview-huawei`, `quickapp-webview-union` | 通过 | `uni-app-vite-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+7) | 53167 | 214 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| taro-vite-vue3-tailwindcss-v4 | demo | weapp | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | 通过 | `taro-vite-vue3-tailwindcss-v4/dist/app.wxss` (+4) | 338609 | 1693 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| uni-app-vite-tailwindcss-v4 | demo | mp-weixin | `app-android`, `app-ios`, `h5`, `h5:ssr`, `mp-alipay`, `mp-baidu`, `mp-jd`, `mp-kuaishou`, `mp-lark`, `mp-qq`, `mp-toutiao`, `mp-weixin`, `mp-xhs`, `quickapp-webview`, `quickapp-webview-huawei`, `quickapp-webview-union` | 通过 | `uni-app-vite-tailwindcss-v4/dist/build/mp-weixin/app.wxss` (+7) | 53267 | 214 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| weapp-vite-tailwindcss-v4 | demo | weapp | `weapp` | 通过 | `weapp-vite-tailwindcss-v4/dist/app.wxss` (+3) | 20003 | 123 | 否 | 否 | 否 | 是 | 是 | 否 | 否 | 否 | 是 |
| taro-webpack-react-tailwindcss-v4 | demo | web | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | 通过 | `taro-webpack-react-tailwindcss-v4/dist` (+4) | 460183 | 2305 | 是 | 否 | 是 | 是 | 是 | 否 | 否 | 是 | 否 |
| taro-webpack-react-tailwindcss-v4 | demo | web-compact | `weapp`, `swan`, `alipay`, `tt`, `h5`, `rn`, `qq`, `jd`, `harmony-hybrid` | 通过 | `taro-webpack-react-tailwindcss-v4/dist` (+4) | 442372 | 2305 | 是 | 否 | 是 | 是 | 是 | 否 | 否 | 是 | 否 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Entry: uni-app-vite-tailwindcss-v4/dist/build/app

| Bytes | Selectors | @supports | :hover | Tailwind banner | System dark media | Manual dark selector | Raw arbitrary selector | Weapp escaped arbitrary selector |
| ---: | ---: | --- | --- | --- | --- | --- | --- | --- |
| 36791 | 172 | true | true | true | true | true | false | true |
| 99890 | 628 | true | true | true | true | true | false | true |

## Generator CSS Files

Expand All @@ -22,7 +22,7 @@ Entry: uni-app-vite-tailwindcss-v4/dist/build/app

| File | Artifact | Bytes | Selectors | @supports | :hover | Tailwind banner | System dark media | Manual dark selector | Raw arbitrary selector | Weapp escaped arbitrary selector |
| --- | --- | ---: | ---: | --- | --- | --- | --- | --- | --- | --- |
| `app.css` | [artifacts/app.css](artifacts/app.css) | 31366 | 166 | true | true | true | true | true | false | true |
| `app.css` | [artifacts/app.css](artifacts/app.css) | 94253 | 622 | true | true | true | true | true | false | true |
| `pages-order/pages/home/home.css` | [artifacts/pages-order__pages__home__home.css](artifacts/pages-order__pages__home__home.css) | 1851 | 4 | true | false | true | false | false | false | false |
| `pages-order/pages/user/user.css` | [artifacts/pages-order__pages__user__user.css](artifacts/pages-order__pages__user__user.css) | 1851 | 4 | true | false | true | false | false | false | false |
| `pages/index/index.css` | [artifacts/pages__index__index.css](artifacts/pages__index__index.css) | 1723 | 6 | false | false | false | false | false | false | true |
| `pages/index/index.css` | [artifacts/pages__index__index.css](artifacts/pages__index__index.css) | 1935 | 6 | false | false | false | false | false | false | true |
Loading
Loading