perf(weapp-tailwindcss): optimize Tailwind v4 build and HMR hot paths#996
Merged
Conversation
🦋 Changeset detectedLatest commit: b2f728f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
针对用户反馈的 Tailwind CSS v4 构建与 HMR 性能问题,补齐 Vite/Webpack 关键流程覆盖与阶段计时,优化已确认的候选更新和 Vite CSS 产物热点,并建立 PR 基线对比性能门禁。
Changes
generateBundle和 WebpackprocessAssets增加阶段级 timing detailspnpm perf:guard:PR 对比 base SHA,push/manual 保留 current-vs-published 趋势processAssets插件阶段仍执行 10% 门禁Performance
GitHub Actions 基准:
29318724562,对比 PR base2372a3649;build 3 次、HMR 6 次,表中为中位数。Performance guard 通过,0 个违规项。Framework HMR
Core Hot Paths
Build 稳态中位数在五个框架上的平均变化为
-1.02%;插件 Build 平均变化为-5.54%。Testing
pnpm --filter weapp-tailwindcss exec vitest run test/bundlers/vite-processed-css-assets.unit.test.ts test/ci/benchmark-report.test.ts test/ci/workflows.test.ts --pool=threads --maxWorkers=1E2E_PROJECT_FILTER='^uni-app-vite-tailwindcss-v4$' pnpm exec vitest run -c ./e2e/vitest.e2e.config.ts e2e/apps-generator-mode-compare.test.ts -t 'builds retained demos'pnpm --filter weapp-tailwindcss buildnode --check29318724517passed,包括 Quality、Compatibility、E2E Static、Focused、Multiplatform 与 Watch gates29318724518passed29318724562passed,五框架与三个 core 场景均无错误且 timing 样本完整pnpm --filter weapp-tailwindcss testcompleted with 2815 passed and 10 snapshot indentation failures. These failures reproduce in theorigin/mainbaseline; no unrelated snapshots were updated.