Skip to content

Routes formatted as $foo-bar are being prioritised over routes formatted as foo-bar. #11159

Closed
@jtaccinelli

Description

@jtaccinelli

Reproduction

  1. Go to this reproduction on StackBlitz
  2. Visit /pages/foo-bar

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.10.5 - /usr/local/bin/pnpm
  npmPackages:
    @remix-run/css-bundle: * => 2.4.1 
    @remix-run/dev: * => 2.4.1 
    @remix-run/node: * => 2.4.1 
    @remix-run/react: * => 2.4.1 
    @remix-run/serve: * => 2.4.1

Used Package Manager

npm

Expected Behavior

In the case where there are routes using pages.$foo-bar.tsx and pages.foo-bar.tsx routes, I would expect /pages/foo-bar to match with the pages.foo-bar.tsx file, not the pages.$foo-bar.tsx file.

Actual Behavior

When visiting /pages/foo-bar, the pages.$foo-bar.tsx file is matched over the pages.foo-bar.tsx file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions