Closed hdm closed 5 years ago
I'm not an expert on webpack
stuff, so I don't have any answers, just more questions. :)
We can add a flag, --clean-assets
, to delete the folder before we start the building process. I don't want to auto delete everything, as people put other things in that folder, that aren't webpack, and I don't want to destroy them.
My real question is, and one I don't have any answer to is, shouldn't webpack be cleaning up the old files when it generates new ones? I feel like it should.
@paganotoni might be able to shed more light on this issue than I can (which is none, none more light). :)
Description
The
buffalo build
command will include all files in./public/assets
in the binary at build-time. This includes all of the previously-versioned asset folders, older assets, etc. In one particularly ugly case, this resulted in 20Gb of memory usage and 450Mb binary files (with 30 minute build times).Steps to Reproduce the Problem
./public/assets
buffalo build
Expected Behavior
I expected
buffalo build
to regenerate the entire assets directory on each build, removing old files. On a system with 6 months of development work, this directory had grown to over 3Gb, and the resulting build times, memory usage, and binary files were all huge as a result.Actual Behavior
The
buffalo build
command would purge the contents of./public/assets
on each build. Doing this manually currently fails due to #1560Info
Please run
buffalo info
and paste the information below where it says "PASTE_HERE".