When gulp compiles and packages with watch, how to tell that a folder in dist is empty?

how can gulp tell that a folder in dist is empty when it is compiled and packaged with watch, which means that all the files in this folder have been deleted, but I can"t tell that the folder in dist is empty, so I can"t delete the empty folder

Sep.21,2021
Menu