hydrogen
hydrogen copied to clipboard
[BUG] API routes - static routes don't override dynamic routes
Describe the bug
From the routing docs:
You can also provide a custom static implementation of a dynamic page to override the default. Any requests to /products/hoodie are rendered using hoodie.server.jsx instead of [handle].server.jsx:
/routes/products/hoodie.server.jsx
/routes/products/[handle].server.jsx
This doesn't apply to API routes, where the dynamic route catches both static and dynamic routes.
To Reproduce
https://stackblitz.com/edit/github-agmxcg
Point your browser to /example/static - the static route is treated like a dynamic route.
Additional context
- Hydrogen version: 1.4.2
cc) @batzlerg