Conversation
Add the `main` field to react-on-rails-pro and react-on-rails-pro-node-renderer package.json files to ensure compatibility with legacy module resolvers like eslint-import-resolver-node and eslint-import-resolver-babel-module. These resolvers use the `resolve` npm package which doesn't support Node.js conditional exports, causing false positive "Unable to resolve path to module" errors even though the imports work at runtime. Fixes #2255 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
WalkthroughTwo Pro packages received a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ 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 |
Code Review - PR #2256SummaryThis PR adds the ✅ Strengths1. Well-Documented Rationale
2. Consistency with Existing Patterns
3. Zero Breaking Changes
|
size-limit report 📦
|
Summary
mainfield toreact-on-rails-propackage.json pointing tolib/ReactOnRails.full.jsmainfield toreact-on-rails-pro-node-rendererpackage.json pointing tolib/ReactOnRailsProNodeRenderer.jsThis ensures compatibility with legacy module resolvers like
eslint-import-resolver-nodeandeslint-import-resolver-babel-modulethat use theresolvenpm package, which doesn't support Node.js conditional exports.Without the
mainfield, these resolvers produce false positive "Unable to resolve path to module" errors even though imports work correctly at runtime.Test plan
mainfield paths match thedefaultexport in each package'sexportsfieldFixes #2255
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.