johnagan / clean-webpack-plugin

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

Add an option to clean() only one time at start/init (inside watch-mode) #125

Closed crazyx13th closed 5 years ago

crazyx13th commented 5 years ago

Hey there,

would be nice to have this option to clean up only on start my dev-server or every x-times. Reason is that cleaning up my folders takes 0.5 - 1.0 sec :-) thx!

Greetings crazyx13th

chrisblossom commented 5 years ago

It is already an option:

new CleanWebpackPlugin({
    cleanStaleWebpackAssets: false,
});
EgoPingvina commented 4 years ago

Will this option work correct in prod mode, or I should create two different options of the plugin for each build mode?