diff --git a/packages/nuxt/src/components/runtime/server-component.ts b/packages/nuxt/src/components/runtime/server-component.ts index e88118149f..a56fe0d7f6 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 = await isPrerendered(route.path) ? route.path : route.fullPath.replace(/#.*$/, '') + const path = !import.meta.dev && await isPrerendered(route.path) ? route.path : route.fullPath.replace(/#.*$/, '') return () => { return h('div', [