From 8911c0d0dd1173c9b5601b7c8902c787e591779c Mon Sep 17 00:00:00 2001 From: Julien Huang Date: Mon, 25 Mar 2024 11:19:02 +0100 Subject: [PATCH] fix(nuxt): move `v-if` to wrapper in islands transform (#26386) --- .../nuxt/src/components/islandsTransform.ts | 51 +++++++++++++------ packages/nuxt/test/islandTransform.test.ts | 35 +++++++++++-- 2 files changed, 67 insertions(+), 19 deletions(-) diff --git a/packages/nuxt/src/components/islandsTransform.ts b/packages/nuxt/src/components/islandsTransform.ts index 5d4f452508..da41e693df 100644 --- a/packages/nuxt/src/components/islandsTransform.ts +++ b/packages/nuxt/src/components/islandsTransform.ts @@ -34,6 +34,7 @@ const HAS_SLOT_OR_CLIENT_RE = /(]*>)|(nuxt-client)/ const TEMPLATE_RE = /