https://github.com/sapphi-red/vite-plugin-static-copy/pull/152 improves peformance of it. But there's still room to improve. It should be possible to use a trie tree here to improve it further more.