server/api/[route].ts doesn't work with dynamic route
I use Nuxt3 with Laravel to separate frontend/backend.
I catch every GET api routes with
However,when I use dynamic route such as
Nuxt 3.15.4
vue latest
Laravel 12.1
Some test results here:
fetch
fetch
fetch
I catch every GET api routes with
server/api/[route].get.tsexcept auth routes.However,when I use dynamic route such as
/api/users/${id}, that route is considered as location in Nuxt3,not API route to Laravel.Nuxt 3.15.4
vue latest
Laravel 12.1
Some test results here:
fetch
/api/doesexist -> return jsonfetch
/api/doesnotexist -> return Laravel's fallbackfetch
/api/doesexist/${variable} -> Nuxt's 404 error