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

HMR not working, server going through a full reload every time a file changes #91

Open
pthieu opened this issue May 29, 2023 · 0 comments

Comments

@pthieu
Copy link

pthieu commented May 29, 2023

In my index.ts I have a migration that runs, which will print some status strings.

I noticed that every time I change a file (say a controller.ts file) which has logic for an API, these migration strings will print, which leads me to believe the whole app is getting a full reload.

I read in the docs/issues that Vite will build a graph of modules and only hot-reload the ones that actually changed but this doesn't seem to be the case for me.

I do have my vite.config.ts set to use tsCompiler: 'esbuild', and I have an esbuild.mjs file that will bundle and minify my app so I'm wondering if it just replaces the entire file because there's only one file.

@pthieu pthieu changed the title Server going through a full reload every time a file changes HMR not working, server going through a full reload every time a file changes May 29, 2023
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