Skip to content

fix(plugin-vue): reuse template ASTs across later minor versions - #847

Draft
ubugeeei wants to merge 2 commits into
vitejs:mainfrom
ubugeeei-forks:fix/template-ast-version-check
Draft

ubugeeei wants to merge 2 commits into
vitejs:mainfrom
ubugeeei-forks:fix/template-ast-version-check

Conversation

@ubugeeei

@ubugeeei ubugeeei commented Sep 16, 2026

Copy link
Copy Markdown

Vue 3.5.0–3.5.2 and 3.6 prereleases currently fail the template AST reuse check because their patch version is below 3 or contains a prerelease suffix. Compare the minor version first so these compilers receive the descriptor AST, while retaining the fallback for versions before 3.4.3.

The regression tests cover both sides of the 3.4.3 boundary, later minor releases, prereleases, and an unavailable version. Run the existing unit suite in CI alongside the playground tests. The configured-root assertion now uses Vite's normalized path on Windows, where enabling that suite exposed a separator mismatch.

Validation: unit tests (16 passed, 10 existing todo), build, lint, typecheck, and Vue production playground tests (41 passed, 14 existing skips).

This Draft PR is tracked from the RFC 823 reference implementation. Its top-level SFC match needs the descriptor AST preserved by this check. This version comparison fix is independent of the proposed syntax and does not implement or accept the RFC.

@ubugeeei

Copy link
Copy Markdown
Author

This remains a Draft companion to the RFC 823 reference implementation.

At e1f611ad5, fork CI passes on Linux (Node 20/22/24), macOS and Windows, including build, unit tests, and dev/production playground tests. Local lint and type checks pass. Enabling unit tests exposed an existing Windows path-separator mismatch in the configured-root assertion; it now compares Vite's normalized path.

Upstream CI still requires maintainer approval; the fork run does not replace that check. The actual companion compiler also passes dev, production and header-only HMR browser checks with top-level SFC matches.

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