-
Notifications
You must be signed in to change notification settings - Fork 41
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
Invisible 'server' panel doesn't play well with the HMR feature #87
Comments
Just found a better solution:
Please let me know what you think |
I've just used Vite's vite:beforeUpdate to close the server: server = startServer();
if (import.meta.hot) {
import.meta.hot.on('vite:beforeUpdate', () => {
server.close();
})
} Seems to work reliably! |
Just tried that, cannot get it to work.. do you use native |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've added another panel aside the main one, called 'server' which intended to expose my main panel to outside apps.
My folder structure is as follows:
src/serve/index.ts
code:The problem:
Each time I save any file HMR is triggered for all the files under
src
(and I do get that it's expected behavior) causing thelisten
function to re-run and raise theEADDRINUSE
error.My workaround:
Adding the following line to the
triggerHMR
function that's insidevite.es.config.ts
:triggerHMR
looks like that right now:So ultimately I'm losing the HMR feature for that panel, and each time I want it's code changes to take place I have to rebuild and restart After Effects..
Any ideas how to properly overcome that?
The text was updated successfully, but these errors were encountered: