fix: apply addon preparsers on initial load#2664
Merged
antfu merged 1 commit intoJul 13, 2026
Merged
Conversation
✅ Deploy Preview for slidev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@slidev/client
create-slidev
create-slidev-theme
@slidev/parser
@slidev/cli
@slidev/types
commit: |
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
Addon
setup/preparser.tshooks were unavailable during Slidev's cold-start/static-build parse becauseresolveOptions()returned data loaded with only the project root.This change:
themeandaddonsto the graph that was actually loaded, while preserving final non-discovery fields and applying CLI overrides lastThe regression makes bootstrap and final headmatter intentionally diverge, verifies the full-root second load, and catches stale-config or unloaded-root contradictions.
Closes #2646
Validation
@slidev/clibuild passedgit diff --checkpassedGitHub Actions completed with 16 successful and 2 neutral checks. The only failures were
typecheckandcypress; the same two jobs also fail on upstreammainat base SHA905b44ba(base run), while the PR's Windows/macOS/Linux tests and all smoke matrices passed.Locally,
pnpm verifylikewise reaches unchanged Cypress/VitePress/duplicate dependency type errors and CRLF lint errors in unchanged Markdown files. The production build, complete test suite, and changed-file lint all pass.AI assistance
Codex (GPT-5, autonomous) analyzed the issue, implemented and iteratively reviewed the change, and ran the validations above on behalf of @NgoQuocViet2001. The operator requested the contribution but did not manually author or line-by-line review the patch.