johnagan / clean-webpack-plugin

A webpack plugin to remove your build folder(s) before building
MIT License
1.96k stars 136 forks source link

feat: allow to preserve previous builds for `maxAge` seconds #192

Closed Dattaya closed 3 years ago

Dattaya commented 3 years ago

Fixes #176, #3 @johnagan, @chrisblossom, I can think of three ways (there could be more) not preserving some of the recent builds might backfire:

It's still a draft because I don't know if you're interested and if I'm moving in the right direction. So far I save the list of assets from previous builds in a file, filename and path are configurable. preserve option is only handled on initial builds, should it work during watch rebuilds as well? Potential improvements: