Skip to content

@react-router/remix-routes-option-adapter not working as expected with remix-flat-routes #14259

@dizzyjaguar

Description

@dizzyjaguar

Reproduction

https://github.com/dizzyjaguar/rr7-bug

System Info

System:
    OS: macOS 15.6.1
    CPU: (8) arm64 Apple M3
    Memory: 125.11 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
    bun: 1.1.8 - ~/.bun/bin/bun
  Browsers:
    Chrome: 139.0.7258.139
    Safari: 18.6
  npmPackages:
    @react-router/dev: ^7.7.1 => 7.8.2 
    @react-router/node: ^7.7.1 => 7.8.2 
    @react-router/remix-routes-option-adapter: ^7.8.2 => 7.8.2 
    @react-router/serve: ^7.7.1 => 7.8.2 
    react-router: ^7.7.1 => 7.8.2 
    vite: ^6.3.3 => 6.3.5

Used Package Manager

npm

Expected Behavior

Co-located components in route directories won't be treated as routes. Like in Remix with the remix-flat-routes configuration I'm safely able to co-locate components with my routes. (as done so in my repo)

Actual Behavior

Co-located components in route directories are being treated as routes, thus causing issues when they are expecting props.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions