Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix static content removal for lean chunks due to Vue 3.5 changes #4508

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

yyx990803
Copy link
Member

@brc-dd we need to do some manual testing to make sure this works with Vue 3.4 and below (could be explicitly installed by user)

Also let's test this for Vue and Vite docs before releasing.

@brc-dd
Copy link
Member

brc-dd commented Jan 22, 2025

/publish

Copy link

pkg-pr-new bot commented Jan 22, 2025

npm i https://pkg.pr.new/vitepress@4508

commit: 4b04261


return createRouter((path) => {
let pageFilePath = pathToFile(path)
let pageModule = null

if (pageFilePath) {
// use lean build if this is the initial page load
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because in 3.5 the static vnodes are cached per-instance instead of globally hoisted, we can no longer rely on adopted content during hydration when navigating back to the initial page. We have to load the full chunk here in that case.

Copy link
Member

@brc-dd brc-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on vite and vue docs. Seems to work fine with vue 3.4 too.

@brc-dd brc-dd merged commit 8214cae into main Jan 22, 2025
11 checks passed
@brc-dd brc-dd deleted the fix-lean-chunks branch January 22, 2025 07:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants