Repository navigation
[expo-router] Generated typed routes should be committed to version control #41872
ForestSpark
started this conversation in
Proposals and Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
The current recommendation to gitignore generated typed routes (
.expo/types/router.d.ts) creates significant developer experience issues in team environments. This issue proposes reconsidering the recommendation to allow (or encourage) committing these files.Current Behavior
Per the typed routes documentation:
Generated typed routes are automatically excluded from version control.
Problem
This creates several workflow issues for development teams:
1. Branch Switching Breaks TypeScript
2. Post-Pull Type Errors
When pulling latest changes from main that include new routes:
expo startbriefly just to regenerate types3. CI/CD Complexity
While
npx expo customize tsconfig.jsonis mentioned for CI (#34686), this:4. Inconsistent Developer Experience
Proposed Solution
Allow (or recommend) committing generated typed routes by:
.expo/from default gitignore (or making it configurable)Why This Makes Sense
router.d.tsis deterministic - same routes always produce the same typesgit checkoutorgit pullSimilar Patterns in Other Frameworks
.next/types/directory for App Router typesEnvironment
Related Issues
Thank you for considering this!
All reactions