-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
old build files not cleaned up automatically in dev mode #2432
Comments
I have the same behavior, build folder is not cleaned up automatically. |
I have encountered the same issue. My workaround is to remove the two Remix output directories before starting the dev server. |
I am running into the same issue. Just cleaned out almost 10GB of files. 😱 Was there any progress on this? |
For the contributors who would start on this, I did some testing and came up with following observation I posted in my duplicate ticket:
|
The issue is that remix/packages/remix-dev/cli/commands.ts Lines 226 to 237 in 1521386
|
@dmarkow the exit-hook package now support async code. |
I just add a "clean" script that runs before "dev" that deletes the build folders. "clean": "rimraf build public/build",
"dev": "npm run clean && remix dev", You'll need to add the |
but what about hot reload ? |
True. This is primarily so my build folders are not unbounded. |
This issue can be solved by using esbuild in-memory ("write: false" option). evanw/esbuild#139 When content is served by the remix request handlers, remix can lookup the resource within the in memory compilation Using an in-memory would most likely result in faster compilations. WDYT? |
not sure what the downsides are but what if the hashing of file names is disabled in dev mode? |
Fixed by #5223 |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
1.1.3
Steps to Reproduce
Create a project with remix and continue to make changes in the projects. New build files with new hashes are generated on every code change. Build folder size continues to increase drastically over time as the old build files are not cleaned up.
Expected Behavior
Old and unused build files should be automatically removed to avoid a drastic increase in the build folder size
Actual Behavior
In #2425 discussion, @sergiodxa mentioned that this issue was fixed in #252
I tried stopping the remix dev server and re-started it. But the build folder is not cleaned up automatically.
Currently, my build folder size is 24 GB.
The text was updated successfully, but these errors were encountered: