Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(plugin-vue): return rerender function when user empty the template #2142

Merged
merged 3 commits into from
Feb 24, 2021
Merged

fix(plugin-vue): return rerender function when user empty the template #2142

merged 3 commits into from
Feb 24, 2021

Conversation

CHOYSEN
Copy link
Contributor

@CHOYSEN CHOYSEN commented Feb 21, 2021

Fix #2128

Note: this PR only fix user empty the template but doesn't fix user unlink the .vue file, i think that one needs more consideration.

@@ -49,3 +49,17 @@ export function getDescriptor(filename: string, errorOnMissing = true) {
export function setDescriptor(filename: string, entry: SFCDescriptor) {
cache.set(filename, entry)
}

export function isEqualBlock(a: SFCBlock | null, b: SFCBlock | null) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to move this function. Just export it from handleHotUpdate is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, done.

@CHOYSEN CHOYSEN requested a review from yyx990803 February 23, 2021 16:35
@yyx990803 yyx990803 merged commit 493b942 into vitejs:main Feb 24, 2021
sapphi-red added a commit that referenced this pull request Nov 14, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HMR: change or unlink SFC file not be rendered in time
2 participants