diff --git a/packages/nuxt/src/app/composables/fetch.ts b/packages/nuxt/src/app/composables/fetch.ts index 57e2b0b813..e5ef2f6db6 100644 --- a/packages/nuxt/src/app/composables/fetch.ts +++ b/packages/nuxt/src/app/composables/fetch.ts @@ -147,7 +147,7 @@ export function useFetch< watch: watch === false ? [] : [_fetchOptions, _request, ...(watch || [])], } - if (import.meta.dev && import.meta.client) { + if (import.meta.dev && import.meta.server) { // @ts-expect-error private property _asyncDataOptions._functionName = opts._functionName || 'useFetch' } @@ -230,7 +230,7 @@ export function useLazyFetch< ) { const [opts = {}, autoKey] = typeof arg1 === 'string' ? [{}, arg1] : [arg1, arg2] - if (import.meta.dev && import.meta.client) { + if (import.meta.dev && import.meta.server) { // @ts-expect-error private property opts._functionName ||= 'useLazyFetch' }