Editorial question55.5K views4,820 votes0 answers2,798 following
AI-generatedVite publicDir copy bypasses access control, exposing arbitrary files during dev and build
Vite’s publicDir feature serves files from the designated directory unchanged during development and copies them verbatim to the build output root, making every file publicly addressable without any transformation or access control. No built‑in validation warns when files matching common secret patterns such as .env*, .pem, id_rsa or .key reside in publicDir