diff --git a/packages/nuxt/src/components/runtime/server-component.ts b/packages/nuxt/src/components/runtime/server-component.ts index a56fe0d7f6..ca32c688a3 100644 --- a/packages/nuxt/src/components/runtime/server-component.ts +++ b/packages/nuxt/src/components/runtime/server-component.ts @@ -42,7 +42,7 @@ export const createIslandPage = (name: string) => { }) const route = useRoute() - const path = !import.meta.dev && await isPrerendered(route.path) ? route.path : route.fullPath.replace(/#.*$/, '') + const path = import.meta.client && await isPrerendered(route.path) ? route.path : route.fullPath.replace(/#.*$/, '') return () => { return h('div', [