Closed bensampaio closed 8 years ago
that's more than i'd like this plugin to manage. lucky others have already provided plugins to do this
https://github.com/johnagan/clean-webpack-plugin https://github.com/banama/webpack-clean-plugin
What I want is a bit different from what those plugins do. Those plugins have no knowledge of what is actually generated by webpack. They delete all the files on the folders you specify. And If you have files that are not supposed to be deleted then you also need to remember to always exclude them. In the end I always prefer to delete them manually then to configure what can and can't be deleted.
But your plugin keeps a list of the last generated files, so every time you run webpack you could clean only the last generated files making sure no other files are deleted.
Think about it 😛
Would be cool to have an option to delete the previous generated files. I ask this because during development I end up with a huge amount of files that I don't need... What do you think?