You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use useRequestURL() composable, but it returns different url on the server and client if the baseUrl is set in nuxt config app: { baseURL: "/my-app/" }. On the server, it returns url with path /my-app/my-app/, on the client, it returns the correct url with path /my-app/.
I found source file: nuxt/packages/nuxt/src/app/composables/url.ts:
Environment
Reproduction
https://stackblitz.com/
Describe the bug
I am trying to use useRequestURL() composable, but it returns different url on the server and client if the baseUrl is set in nuxt config
app: { baseURL: "/my-app/" }
. On the server, it returns url with path/my-app/my-app/
, on the client, it returns the correct url with path/my-app/
.I found source file:
nuxt/packages/nuxt/src/app/composables/url.ts
:There may be a problem in this line:
url.pathname = joinURL(useRuntimeConfig().app.baseURL, url.pathname)
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: