Vite 5: Staging Builds Force import.meta.env.PROD=true Despite Custom MODE
Context Vite 5 couples the build command to import.meta.env.PROD === true regardless of the --mode flag. When running vite build --mode staging , import.meta.env.MODE correctly resolves to "staging" , yet import.meta.env.PROD remains true and import.meta.env.DEV stays false . Constraint Applications that gate production-only code paths behind if (!import.met