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 jsx hmr #1495

Merged
merged 3 commits into from
Jan 12, 2021
Merged

Fix jsx hmr #1495

merged 3 commits into from
Jan 12, 2021

Conversation

Jokcy
Copy link
Contributor

@Jokcy Jokcy commented Jan 12, 2021

Fix #1486.

Remove the compare logic so that add components will reload.

Also remove code that generate hash.

callbackCode +=
`\n if (__${exported}.__hmrHash !== ${local}.__hmrHash) ` +
`__VUE_HMR_RUNTIME__.reload("${id}", __${exported})`
callbackCode += `__VUE_HMR_RUNTIME__.reload("${id}", __${exported})`
Copy link
Member

Choose a reason for hiding this comment

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

Here lost \n

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed, also updated tests

@underfin underfin merged commit 6bdc3eb into vitejs:main Jan 12, 2021
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.

hmr work not correctly with jsx plugin for vue3
3 participants