You can try a tool that I made to bundle in development o production mode an electron app. The npm package's name is @eduardoleolim/electron-esbuild. The tool use esbuild or vite just for renderer process.
When use my tool with vite, the bundle file of renderer process is not generated. I think that is a default behavior of vite.