-
DescriptionI'm creating the following pages: Here, for example, the route If I change Steps to reproducehttps://codesandbox.io/s/blue-frog-b4d73?file=/gatsby-node.js On the Home Page, we have a link to /app, that should render Expected resultTo have the Actual resultThe Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I was playing with getMatchPaths and, indeed, |
Beta Was this translation helpful? Give feedback.
-
The path ranking algorithm we use is pretty much copy of reach/router internals ( which are documented in https://reach.tech/router/ranking ). Using example route you provided it seems like both gatsby/packages/gatsby/src/bootstrap/requires-writer.ts Lines 154 to 156 in 3e92795 The math happening right now:
I think for this case it seems intuitive that |
Beta Was this translation helpful? Give feedback.
The path ranking algorithm we use is pretty much copy of reach/router internals ( which are documented in https://reach.tech/router/ranking ).
Using example route you provided it seems like both
/:slug
and/app/*
rank exactly the same with score of6
, which is problematic. In case of same rank we do use alphabetic order (gatsby/packages/gatsby/src/bootstrap/requires-writer.ts
Lines 154 to 156 in 3e92795