I had the same problem with the following configuration for all files in subfolders: js / (e.g. js / lib / *. Js):
build: { expand: true, cwd: 'js/', src: ['**/*.js','!*.min.js'], dest: 'js/', ext: '.min.js', }
You have to limit more files, because if the file matches the src parameter, the content will be added and will not be replaced - since it is "blocked", I think:
src: ['**/*.js','!**/*.min.js']
This should solve your problem.
source share