DragonsInn/fontgen-loader

Does't remove previous versions of files

Opened this issue · 3 comments

When run watch mode in webpack and change for example scss file the fontgen-loader generate new files (with hash) but previous generated filesstill exist.

My fileName configuration (webpack loaders): fonts/[fontname]-[hash][ext]

Currently I remove hash from filename.

This is common with Webpack and watch mode. This is not a problem of the fontgen-loader on it’s own. I too have this issue wit a way bigger project and it is why I might need to code a plugin for that too...

Ok, thanks

Try using clean-webpack-plugin. I've used it to clean out all generated files (and leave ones that I need by setting them excluded in plugins options) before generating new ones in my js dir.