A temporary repository to showcase the bug of this issue.
main
→ "Vanilla" Electron project without bundler, works as expectedwith-webpack
→ Electron project with webpack as bundler (for renderer only), has the bugwith-vite
→ Electron project with Vite as bundler (for renderer only), has the bug
See the README
file for each branch for instructions on how to reproduce the bug.