babel-loader icon indicating copy to clipboard operation
babel-loader copied to clipboard

Prune babel-loader's cache so it does not grow forever

Open gdborton opened this issue 7 years ago • 2 comments

I'm submitting a feature request Would it be possible to add a way to prune the babel-loader cache after webpack runs? We've started uploading/downloading our cache in CI to help performance across builds, but the babel-cache grows unbounded and eventually bogs down our CI.

Babel Loader Version: 7.1.4

Current behavior: babel cache grows unbounded

Expected/desired behavior: It doesn't.

gdborton avatar Jul 02 '18 22:07 gdborton

We could consider having some kind of LRU prune step the first the time loader runs in a given process, or something. It's a little ugly no matter what unfortunately.

loganfsmyth avatar Sep 02 '18 21:09 loganfsmyth

Agreed about the ugliness, especially since we can have more than one compiler/process trigger babel-loader.

gdborton avatar Sep 27 '18 21:09 gdborton