Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
86419ef
fix: resolve weapp-tailwindcss src type issues
sonofmagic May 14, 2026
04d4294
fix: add repo lint and typecheck gates
sonofmagic May 14, 2026
2471053
fix: support source ts extension imports
sonofmagic May 14, 2026
2f6766e
fix: use relative wxml utility import
sonofmagic May 14, 2026
52b3e97
fix: avoid layered v3 compatibility css
sonofmagic May 14, 2026
e8d66d8
fix: strip runtime css cascade layers
sonofmagic May 14, 2026
2324de6
fix: preserve runtime css cleanup scope
sonofmagic May 14, 2026
bfc6dd2
test: cover taro webpack comment carrier hmr
sonofmagic May 14, 2026
b24edab
test: stabilize e2e css snapshots and mpx resolve
sonofmagic May 14, 2026
831ce36
ci: stabilize e2e watch mpx resolution
sonofmagic May 14, 2026
8aeeab5
ci: stabilize mpx watch hmr checks
sonofmagic May 14, 2026
e52c884
test: normalize watch matrix paths on windows
sonofmagic May 14, 2026
a50b90d
test: allow template content hmr reports
sonofmagic May 14, 2026
95c09fd
fix: prefer tailwindcss root imports
sonofmagic May 14, 2026
983f803
test: strengthen ide coverage matrix
sonofmagic May 14, 2026
10517ad
fix: stabilize tailwind import and watch hmr checks
sonofmagic May 15, 2026
607612d
fix: tolerate watch rollback fallback metrics
sonofmagic May 15, 2026
50bc4a4
fix: stabilize e2e watch ci budgets
sonofmagic May 15, 2026
61311b0
ci: extend macos uni watch budgets
sonofmagic May 15, 2026
f744bc2
ci: relax weapp-vite v4 watch threshold
sonofmagic May 15, 2026
7fa2a29
fix: warm watch hmr before content refresh
sonofmagic May 15, 2026
76c5c68
fix: wait for watch hmr baseline outputs
sonofmagic May 15, 2026
c76b164
fix: accept semantic watch hmr output updates
sonofmagic May 15, 2026
97d80eb
fix: stabilize mpx watch hmr on windows
sonofmagic May 15, 2026
fcc943b
fix: pin tailwind v4 demo basedirs
sonofmagic May 15, 2026
6e73a6d
ci: relax weapp vite v4 watch budget
sonofmagic May 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/fix-src-type-strictness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"weapp-tailwindcss": patch
"@weapp-tailwindcss/postcss": patch
---

修复核心源码在严格 TypeScript 配置下的类型问题,并清理对应 ESLint 诊断。
6 changes: 6 additions & 0 deletions .changeset/tailwindcss-root-import.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"weapp-tailwindcss": patch
"@weapp-tailwindcss/test-helper": patch
---

统一 Tailwind CSS v4 示例、测试辅助入口和构建器重写契约,推荐继续使用 `@import "tailwindcss"`,并仅将 `weapp-tailwindcss` CSS 入口保留为兼容解析路径。
75 changes: 39 additions & 36 deletions .github/workflows/e2e-watch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
watch_case: uni-app-vite-tailwindcss-v3
round_profile: default
watch_save_snapshots: '1'
timeout_minutes: 35
watch_timeout_ms: '240000'
watch_poll_ms: '280'
watch_command_timeout_ms: '600000'
timeout_minutes: 60
watch_timeout_ms: '420000'
watch_poll_ms: '340'
watch_command_timeout_ms: '1500000'
- os: macos-latest
runner_label: macos
watch_case: mpx-tailwindcss-v3
Expand All @@ -69,10 +69,10 @@ jobs:
watch_case: uni-app-vite-tailwindcss-v3
round_profile: issue33
watch_save_snapshots: '1'
timeout_minutes: 35
watch_timeout_ms: '240000'
watch_poll_ms: '280'
watch_command_timeout_ms: '600000'
timeout_minutes: 60
watch_timeout_ms: '420000'
watch_poll_ms: '340'
watch_command_timeout_ms: '1500000'
- os: macos-latest
runner_label: macos
watch_case: weapp-vite-tailwindcss-v3
Expand Down Expand Up @@ -107,9 +107,9 @@ jobs:
round_profile: default
watch_save_snapshots: '1'
timeout_minutes: 45
watch_timeout_ms: '320000'
watch_timeout_ms: '420000'
watch_poll_ms: '320'
watch_command_timeout_ms: '840000'
watch_command_timeout_ms: '960000'
- os: macos-latest
runner_label: macos
watch_case: uni-app-vite-tailwindcss-v4
Expand All @@ -136,6 +136,7 @@ jobs:
timeout_minutes: 40
watch_timeout_ms: '280000'
watch_poll_ms: '300'
watch_max_hot_update_ms: '90000'
watch_command_timeout_ms: '720000'
- os: macos-latest
runner_label: macos
Expand All @@ -151,10 +152,10 @@ jobs:
watch_case: uni-app-vite-tailwindcss-v3
round_profile: default
watch_save_snapshots: '1'
timeout_minutes: 40
watch_timeout_ms: '280000'
watch_poll_ms: '320'
watch_command_timeout_ms: '720000'
timeout_minutes: 60
watch_timeout_ms: '420000'
watch_poll_ms: '340'
watch_command_timeout_ms: '1500000'
- os: windows-latest
runner_label: windows
watch_case: mpx-tailwindcss-v3
Expand All @@ -169,37 +170,37 @@ jobs:
watch_case: taro-webpack-react-tailwindcss-v3
round_profile: default
watch_save_snapshots: '1'
timeout_minutes: 40
watch_timeout_ms: '280000'
watch_poll_ms: '320'
watch_command_timeout_ms: '720000'
timeout_minutes: 60
watch_timeout_ms: '420000'
watch_poll_ms: '340'
watch_command_timeout_ms: '1500000'
- os: windows-latest
runner_label: windows
watch_case: uni-app-vite-tailwindcss-v3
round_profile: issue33
watch_save_snapshots: '1'
timeout_minutes: 40
watch_timeout_ms: '280000'
watch_poll_ms: '320'
watch_command_timeout_ms: '720000'
timeout_minutes: 60
watch_timeout_ms: '420000'
watch_poll_ms: '340'
watch_command_timeout_ms: '1500000'
- os: windows-latest
runner_label: windows
watch_case: taro-webpack-react-tailwindcss-v4
round_profile: issue33
watch_save_snapshots: '1'
timeout_minutes: 45
watch_timeout_ms: '320000'
watch_poll_ms: '340'
watch_command_timeout_ms: '840000'
timeout_minutes: 70
watch_timeout_ms: '600000'
watch_poll_ms: '400'
watch_command_timeout_ms: '1800000'
- os: windows-latest
runner_label: windows
watch_case: taro-vite-vue3-tailwindcss-v4
round_profile: default
watch_save_snapshots: '1'
timeout_minutes: 45
watch_timeout_ms: '320000'
watch_poll_ms: '340'
watch_command_timeout_ms: '840000'
timeout_minutes: 70
watch_timeout_ms: '600000'
watch_poll_ms: '400'
watch_command_timeout_ms: '1800000'
- os: windows-latest
runner_label: windows
watch_case: weapp-vite-tailwindcss-v3
Expand All @@ -223,10 +224,10 @@ jobs:
watch_case: mpx-tailwindcss-v4
round_profile: default
watch_save_snapshots: '1'
timeout_minutes: 40
watch_timeout_ms: '280000'
watch_poll_ms: '320'
watch_command_timeout_ms: '720000'
timeout_minutes: 60
watch_timeout_ms: '600000'
watch_poll_ms: '400'
watch_command_timeout_ms: '1500000'
- os: windows-latest
runner_label: windows
watch_case: weapp-vite-tailwindcss-v4
Expand All @@ -235,6 +236,7 @@ jobs:
timeout_minutes: 45
watch_timeout_ms: '320000'
watch_poll_ms: '340'
watch_max_hot_update_ms: '60000'
watch_command_timeout_ms: '840000'
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ matrix.timeout_minutes }}
Expand Down Expand Up @@ -284,8 +286,9 @@ jobs:
E2E_WATCH_CASE: ${{ matrix.watch_case }}
E2E_WATCH_TIMEOUT_MS: ${{ matrix.watch_timeout_ms }}
E2E_WATCH_POLL_MS: ${{ matrix.watch_poll_ms }}
E2E_WATCH_MAX_HOT_UPDATE_MS: ${{ matrix.watch_max_hot_update_ms || (matrix.runner_label == 'windows' && '30000' || '15000') }}
E2E_WATCH_MAX_HOT_UPDATE_MS: ${{ matrix.watch_max_hot_update_ms || '30000' }}
E2E_WATCH_COMMAND_TIMEOUT_MS: ${{ matrix.watch_command_timeout_ms }}
E2E_WATCH_MAX_ATTEMPTS: ${{ matrix.watch_max_attempts || '2' }}
E2E_WATCH_ROUND_PROFILE: ${{ matrix.round_profile }}
E2E_WATCH_SAVE_SNAPSHOTS: ${{ matrix.watch_save_snapshots }}
NODE_OPTIONS: --max-old-space-size=6144
Expand Down Expand Up @@ -486,7 +489,7 @@ jobs:
E2E_WATCH_CASE: ${{ matrix.watch_case }}
E2E_WATCH_TIMEOUT_MS: ${{ matrix.watch_timeout_ms }}
E2E_WATCH_POLL_MS: ${{ matrix.watch_poll_ms }}
E2E_WATCH_MAX_HOT_UPDATE_MS: ${{ matrix.watch_max_hot_update_ms || (matrix.runner_label == 'windows' && '30000' || '15000') }}
E2E_WATCH_MAX_HOT_UPDATE_MS: ${{ matrix.watch_max_hot_update_ms || '30000' }}
E2E_WATCH_COMMAND_TIMEOUT_MS: ${{ matrix.watch_command_timeout_ms }}
E2E_WATCH_MAX_ATTEMPTS: ${{ matrix.watch_max_attempts || '2' }}
E2E_WATCH_ROUND_PROFILE: ${{ matrix.round_profile }}
Expand Down
1 change: 1 addition & 0 deletions demo/gulp-tailwindcss-v4/gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const generator = {

// 在 Gulp 里使用时,Tailwind CSS 生成由 transformWxss 的生成模式接管,PostCSS 只保留后处理插件
const { transformJs, transformWxml, transformWxss } = createPlugins({
tailwindcssBasedir: process.cwd(),
rem2rpx: true,
generator,
tailwindcss: {
Expand Down
1 change: 1 addition & 0 deletions demo/mpx-tailwindcss-v4/mpx.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = defineConfig({
configureWebpack(config) {
config.plugins.push(
new UnifiedWebpackPluginV5({
tailwindcssBasedir: process.cwd(),
rem2rpx: true,
appType: 'mpx',
})
Expand Down
2 changes: 1 addition & 1 deletion demo/mpx-tailwindcss-v4/src/app.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import "weapp-tailwindcss";
@import "tailwindcss";
@source "../src";
1 change: 1 addition & 0 deletions demo/taro-vite-react-tailwindcss-v4/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default defineConfig<'vite'>(async (merge, { command, mode }) => {
},
},
WeappTailwindcss({
tailwindcssBasedir: process.cwd(),
rem2rpx: true,
generator,
// injectAdditionalCssVarScope: true,
Expand Down
1 change: 1 addition & 0 deletions demo/taro-vite-vue3-tailwindcss-v4/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default defineConfig<'vite'>(async (merge, { command, mode }) => {
},
},
WeappTailwindcss({
tailwindcssBasedir: process.cwd(),
rem2rpx: true,
generator,
// injectAdditionalCssVarScope: true,
Expand Down
1 change: 1 addition & 0 deletions demo/taro-webpack-react-tailwindcss-v4/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default defineConfig<'webpack5'>(async (merge, { command, mode }) => {
plugin: UnifiedWebpackPluginV5,
args: [
{
tailwindcssBasedir: process.cwd(),
rem2rpx: true,
generator,
// before 2248
Expand Down
3 changes: 2 additions & 1 deletion demo/taro-webpack-react-tailwindcss-v4/src/app.css
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import "weapp-tailwindcss";
@import "tailwindcss" source(none);
@source "../src";
1 change: 1 addition & 0 deletions demo/taro-webpack-vue3-tailwindcss-v4/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default defineConfig<'webpack5'>(async (merge, { command, mode }) => {
plugin: UnifiedWebpackPluginV5,
args: [
{
tailwindcssBasedir: process.cwd(),
rem2rpx: true,
generator,
// before 2248
Expand Down
3 changes: 2 additions & 1 deletion demo/taro-webpack-vue3-tailwindcss-v4/src/app.css
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@import "weapp-tailwindcss";
@import "tailwindcss" source(none);
@source "../src";
1 change: 1 addition & 0 deletions demo/uni-app-vite-tailwindcss-v4/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default defineConfig(async () => {
// 改成 mts,则爆 uni is not a function
uni(),
WeappTailwindcss({
tailwindcssBasedir: process.cwd(),
rem2rpx: true,
}),
],
Expand Down
2 changes: 1 addition & 1 deletion demo/weapp-vite-tailwindcss-v4/app.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import 'tailwindcss';
@import "tailwindcss";
@config "./tailwind.config.js";
2 changes: 1 addition & 1 deletion demo/weapp-vite-tailwindcss-v4/tailwind-intellisense.css
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import 'tailwindcss';
@import "tailwindcss";
@source not "dist";
1 change: 1 addition & 0 deletions demo/weapp-vite-tailwindcss-v4/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default defineConfig({
// tailwindcss(),
// @ts-ignore
WeappTailwindcss({
tailwindcssBasedir: process.cwd(),
rem2rpx: true,
}),
],
Expand Down
Loading
Loading