Skip to content

Respect custom appDir for route config#213

Merged
AlemTuzlak merged 1 commit intocode-forge-io:mainfrom
Aeternologist:appdir-for-routes
Aug 21, 2025
Merged

Respect custom appDir for route config#213
AlemTuzlak merged 1 commit intocode-forge-io:mainfrom
Aeternologist:appdir-for-routes

Conversation

@Aeternologist
Copy link
Copy Markdown
Contributor

Description

The plugin now correctly respects the configured appDir instead of assuming the default ./app. This ensures route discovery and “open in editor” features work when users place their app in a custom directory.

Fixes # (issue)

Replaced hardcoded "./app/routes.ts" with appDir, "routes.ts")
Passed appDir through to route generation flows:
handleWriteFile({ ..., appDir })

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Manual verification:

  • Configured the plugin with a custom app dir in vite.config.ts:
    reactRouterDevTools({ appDir: "./src/app" })

  • Ensured src/app/root.tsx and src/app/routes/test.tsx exist and defined routes.

  • Routes appear in the devtools Routes panel.
    “Add route” generates a file under ./src/app/routes/... and opens it in the editor.

  • Unit tests

Checklist:

  • My code follows the guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Aeternologist Aeternologist changed the title fix: respect custom appDir for route config Respect custom appDir for route config Aug 18, 2025
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Aug 19, 2025

Open in StackBlitz

npm i https://pkg.pr.new/forge-42/react-router-devtools@213

commit: ecf701e

@AlemTuzlak AlemTuzlak merged commit c82dd69 into code-forge-io:main Aug 21, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants