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

feat!: upgrade vite to v6 #4504

Merged
merged 4 commits into from
Jan 22, 2025
Merged

feat!: upgrade vite to v6 #4504

merged 4 commits into from
Jan 22, 2025

Conversation

sapphi-red
Copy link
Contributor

@sapphi-red sapphi-red commented Jan 22, 2025

Description

Upgrade Vite to v6

I added a fix for data loader hmr mentioned in #4467 (comment) as well.

Linked Issues

closes #4494
closes #4467

Additional Context


Tip

The author of this PR can publish a preview release by commenting /publish below.

}
return null
},
hotUpdate(ctx) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

hotUpdate function is called for create/update/delete events.

src/node/plugins/staticDataPlugin.ts Outdated Show resolved Hide resolved
Comment on lines 140 to 145
for (const id in idToLoaderModulesMap) {
const { watch } = idToLoaderModulesMap[id]!
if (watch && isMatch(file, watch)) {
ctx.modules.push(server.moduleGraph.getModuleById(id)!)
modules.push(this.environment.moduleGraph.getModuleById(id)!)
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The whole _importGlobMap part existed in transform hook is handled here. The affirmed / negated part is replaced with a simple isMatch because that's more aligned with the glob call.

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.

Thanks a lot! 💚

@brc-dd brc-dd merged commit 6a2efc3 into vuejs:main Jan 22, 2025
9 checks passed
@sapphi-red sapphi-red deleted the feat/vite6 branch January 23, 2025 05:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade VitePress to use Vite v6
2 participants