API route in Route Group not picked up?
Migrating to RC1 caused my API routes in Route Groups (https://start.solidjs.com/core-concepts/routing#route-groups) to stop working? For a minimal repro, do a
npm init solid@latest
and create the file apiget.ts
placing it here:
navigating to /apiget
returns the proper Hello World
.
placing it here:
navigating to /blah/apiget
returns the proper Hello World
.
placing it here:
navigating to /apiget
returns a 404 now, whereas in the v.3 version, it worked and would return the proper API response.5 Replies
Did you add the „// @refresh reload“ to server and client entry?
I didn't, they were added when I installed the default rc1 project.
I installed the lastest RC1 unocss template, then just slowly migrated my files over, fixing bugs as they popped up. This is the only one so far that I've not been able to get going.
this also happens without any of my code, in a default Solid Start RC1 project.
For fun, change
apiget.tsx
to contain the following:
now refresh http://localhost:3000/apiget
, and you'll get the component output.Found an issue where this was fixed previously: https://github.com/solidjs/solid-start/issues/1176 , so it seems like a regression. I've filed a bug report.
Was a bug and Ryans fixed it. https://github.com/solidjs/solid-start/commit/8dff0063359110c3978a40c366d1cd61d1d47e7c
Thanks for coming to my Ted talk.