fix(desktop): ensure NODE_ENV is set in t3-env runtimeEnv#371
fix(desktop): ensure NODE_ENV is set in t3-env runtimeEnv#371saddlepaddle merged 1 commit intomainfrom
Conversation
The previous fix defined process.env.NODE_ENV at build time, but t3-env reads from the runtimeEnv object which was just `process.env`. By explicitly setting NODE_ENV in the runtimeEnv object, Vite's define can replace it with the build-time value. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WalkthroughModified Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5-10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (4)apps/desktop/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)
Files:
apps/desktop/**/*.{ts,tsx}📄 CodeRabbit inference engine (apps/desktop/AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx,json}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-12-12T05:45:09.686ZApplied to files:
📚 Learning: 2025-11-24T21:33:13.267ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
NODE_ENV: process.env.NODE_ENVin runtimeEnv so Vite's define can replace itRoot cause
Previous fix added Vite
defineforprocess.env.NODE_ENV, but t3-env usesruntimeEnv: process.envwhich passes the entire object. The spread doesn't trigger Vite's replacement - only direct property access does.🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.