fix(db): use ESM-compatible __dirname pattern in drizzle.config.ts#166
fix(db): use ESM-compatible __dirname pattern in drizzle.config.ts#166bbornino wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDrizzle configuration file now resolves the ChangesEnvironment path resolution
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Problem: drizzle.config.ts used __dirname which doesn't exist in ESM modules (package.json has "type": "module"), causing dotenv to load 0 env vars when invoked via NX. It also imported from path/win32 instead of the cross-platform path.
Fix: Replace __dirname with the canonical ESM pattern using fileURLToPath(import.meta.url) and dirname. Change path/win32 import to path.
Summary by CodeRabbit