You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Vite with Phoenix's dev watcher the process doesn't shut down and keeps running in the background after the parent process is stopped. This is a follow-up on this closed PR: #1857 and #3659.
It seems that the fix was reverted because people were still having other problems with @nullpilot proposed solution.
However, by running top -bc -n 1 | grep esbuild I can see that the previous process still lingers.
By doing a little research, I manage to find a temporary solution that I can apply directly to my vite.config.js file:
This is what the Phoenix watcher runs through npm run watch: vite build --watch --minify false --emptyOutDir false --clearScreen false --mode development.
PS.: I was wondering if a --watch-stdin flag or something similar would solve this in the same way it did for Webpack.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Hey @Niputi! It seems that this solution is no longer working properly for some reason. I've tested with both 2.6 and 2.7 and the problem persists. I don't know if it's some kind of regression but we should get this fixed cuz each node + esbuild process is leaving a whopping 500Mb memory footprint behind (tested in both MacOs and Ubuntu).
Describe the bug
When using Vite with Phoenix's dev watcher the process doesn't shut down and keeps running in the background after the parent process is stopped. This is a follow-up on this closed PR: #1857 and #3659.
It seems that the fix was reverted because people were still having other problems with @nullpilot proposed solution.
However, by running
top -bc -n 1 | grep esbuild
I can see that the previous process still lingers.By doing a little research, I manage to find a temporary solution that I can apply directly to my
vite.config.js
file:This is what the Phoenix watcher runs through
npm run watch
:vite build --watch --minify false --emptyOutDir false --clearScreen false --mode development
.PS.: I was wondering if a
--watch-stdin
flag or something similar would solve this in the same way it did for Webpack.Reproduction
See previous issues linked to the report
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: