After updateing Vite from 5.2.8 to 5.2.10, I get this warning:
(!) build.outDir must not be the same directory of root or a parent directory of root as this could cause Vite to overwriting source files with build outputs.
According to the comment in the code, this is set on purpose.