Skip to content

Fix typegen for star folder fs routes#15088

Open
puneetdixit200 wants to merge 2 commits into
remix-run:mainfrom
puneetdixit200:fix-star-folder-typegen
Open

Fix typegen for star folder fs routes#15088
puneetdixit200 wants to merge 2 commits into
remix-run:mainfrom
puneetdixit200:fix-star-folder-typegen

Conversation

@puneetdixit200
Copy link
Copy Markdown

Fixes #14744.

This updates filesystem route path generation so a folder route module in routes/*/route.tsx is treated as a splat route while keeping the route id and file path unchanged for generated type imports. Filenames like routes/*.tsx remain unsupported, matching the existing raw * filename rules.

Tests run:

  • pnpm --filter @react-router/fs-routes build
  • pnpm --filter @react-router/fs-routes typecheck
  • pnpm test -- --selectProjects fs-routes --runTestsByPath packages/react-router-fs-routes/__tests__/flatRoutes-test.ts
  • pnpm test:integration:run integration/typegen-test.ts --project=chromium -g "splat|route file in literal star folder"
  • pnpm exec prettier --check packages/react-router-fs-routes/flatRoutes.ts packages/react-router-fs-routes/__tests__/flatRoutes-test.ts integration/typegen-test.ts packages/react-router-fs-routes/.changes/patch.star-folder-splat.md
  • pnpm changes:validate
  • git diff --check

@remix-cla-bot
Copy link
Copy Markdown
Contributor

remix-cla-bot Bot commented May 21, 2026

Hi @puneetdixit200,

Welcome, and thank you for contributing to React Router!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@github-actions
Copy link
Copy Markdown
Contributor

✅ Change File Found

A change file file exists in this PR. Thanks!

@puneetdixit200 puneetdixit200 force-pushed the fix-star-folder-typegen branch from b14fed1 to 93c5d7e Compare May 23, 2026 16:32
@remix-cla-bot
Copy link
Copy Markdown
Contributor

remix-cla-bot Bot commented May 24, 2026

Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳

@brookslybrand brookslybrand deleted the branch remix-run:main June 4, 2026 16:07
@brookslybrand brookslybrand reopened this Jun 4, 2026
@brookslybrand brookslybrand changed the base branch from dev to main June 4, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typegen bug when route file is in folder named * (e.g. /*/route.tsx)

3 participants