Skip to content

fix: preserve uni-app root style shell during hmr#983

Open
sonofmagic wants to merge 5 commits into
mainfrom
codex/fix-uni-app-root-wxss-hmr
Open

fix: preserve uni-app root style shell during hmr#983
sonofmagic wants to merge 5 commits into
mainfrom
codex/fix-uni-app-root-wxss-hmr

Conversation

@sonofmagic

Copy link
Copy Markdown
Owner

Summary

  • preserve framework-owned pure local import root style wrappers during Vite serve and incremental bundles
  • replay generated Tailwind CSS into the imported target without overwriting the root shell
  • add a reusable 7-case HMR matrix for the CI-compatible uni-app Vite demos across wxss, acss, qss, and ttss
  • record explicit exemptions for Taro merged root styles, styleInjector-disabled output, and local-only HBuilderX chains

Verification

  • pnpm --filter weapp-tailwindcss exec vitest run test/bundlers/vite-plugin.bundle.unit.test.ts test/bundlers/vite-css-finalizer.unit.test.ts test/bundlers/vite-helpers.unit.test.ts test/bundlers/vite-processed-css-assets.unit.test.ts test/bundlers/vite-remembered-css-replay.unit.test.ts test/watch-hmr-regression.unit.test.ts (371 passed)
  • pnpm --filter weapp-tailwindcss build
  • pnpm e2e:root-style-shell-hmr (7 passed)
  • filtered subpackage multiplatform build regression for mp-weixin/mp-alipay/mp-toutiao in isolated and single cssEntries modes (6 passed)
  • pnpm exec vitest run --bail=1 -c ./e2e/vitest.e2e.config.ts e2e/e2e-matrix.test.ts (32 passed)
  • targeted ESLint and workflow YAML parse

The broad filtered static run also passed all uni-app checks but retained four existing Taro Vite output failures unrelated to this change.

Release

  • reuses the existing Chinese patch changeset .changeset/quiet-walls-serve.md
  • no create-weapp-vite bump is required because templates and scaffold behavior are unchanged

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f6672f8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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