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

HRM not working for named slots #77

Open
taubi19 opened this issue Jan 27, 2023 · 0 comments
Open

HRM not working for named slots #77

taubi19 opened this issue Jan 27, 2023 · 0 comments

Comments

@taubi19
Copy link

taubi19 commented Jan 27, 2023

The main issue is, that some files with javascript changes, that are hot reloaded are not executed in the browser. After hrm is triggered, the updated file is visible in the browser, but changed javascript is not reflected in the browser. The interesting thing is, that if the html is changed, it is visible after hot reload, javascript change on the other hand is not.

In the example below, if you change the contents of console.log() in Child.vue and press the child button, the old text is printed out in the console. If you refresh the page the new text is printed out. The issue only occurs if Child is passed to Parent using named slots. If you change the named slot to default, everything works as intended.

Minimal example: https://stackblitz.com/edit/vitejs-vite-zrwiae?file=src/App.vue

The behaviour is also demonstrated in the attached video, where it is clear that changing contents of console.log is not reflected after hot reload is initiated.
https://user-images.githubusercontent.com/1347072/215088747-d948ceab-afe2-47c6-90b6-5ecdc990770f.mp4

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

No branches or pull requests

1 participant