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

Implement hot reload (HMR) #2

Closed
crashmax-dev opened this issue Aug 15, 2022 · 0 comments · Fixed by #9
Closed

Implement hot reload (HMR) #2

crashmax-dev opened this issue Aug 15, 2022 · 0 comments · Fixed by #9
Labels
enhancement New feature or request

Comments

@crashmax-dev
Copy link
Collaborator

Inject hot reload script in to proxy script
https://vitejs.dev/guide/api-plugin.html#vite-specific-hooks

if (import.meta.hot) {
  import.meta.hot.on('special-update', (data) => {
    // perform custom update
  })
}
@crashmax-dev crashmax-dev added the enhancement New feature or request label Aug 18, 2022
@crashmax-dev crashmax-dev changed the title Implement hot reload Implement hot reload (HMR) Aug 18, 2022
crashmax-dev added a commit that referenced this issue Aug 18, 2022
@crashmax-dev crashmax-dev mentioned this issue Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant