From 23fbe8513be0a2a6552b5e070e1e20954bcd5e14 Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Mon, 4 Mar 2024 11:32:34 +0100 Subject: [PATCH] perf(nuxt): don't check `isPrerendered` in dev for server page (#26061) --- packages/nuxt/src/components/runtime/server-component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', [