fix(nuxt): add missing island uid for selective client components (#27633)

This commit is contained in:
Matteo Rigoni 2024-06-15 21:12:16 +02:00 committed by GitHub
parent a3d8f005a6
commit 0602dd0ae2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -698,7 +698,7 @@ function replaceIslandTeleports (ssrContext: NuxtSSRContext, html: string) {
if (matchClientComp) {
const [, uid, clientId] = matchClientComp
if (!uid || !clientId) { continue }
html = html.replace(new RegExp(` data-island-component="${clientId}"[^>]*>`), (full) => {
html = html.replace(new RegExp(` data-island-uid="${uid}" data-island-component="${clientId}"[^>]*>`), (full) => {
return full + teleports[key]
})
continue