mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
fix(nuxt): fix replace regex used for slots in islands SSR (#24255)
This commit is contained in:
parent
c1ddb359e3
commit
bd32ccd2d6
@ -584,7 +584,7 @@ function replaceServerOnlyComponentsSlots (ssrContext: NuxtSSRContext, html: str
|
||||
if (!match) { continue }
|
||||
const [, uid, slot] = match
|
||||
if (!uid || !slot) { continue }
|
||||
html = html.replace(new RegExp(`<div nuxt-ssr-component-uid="${uid}"[^>]*>((?!nuxt-ssr-slot-name="${slot}"|nuxt-ssr-component-uid)[\\s\\S])*<div [^>]*nuxt-ssr-slot-name="${slot}"[^>]*>`), (full) => {
|
||||
html = html.replace(new RegExp(`<div [^>]*nuxt-ssr-component-uid="${uid}"[^>]*>((?!nuxt-ssr-slot-name="${slot}"|nuxt-ssr-component-uid)[\\s\\S])*<div [^>]*nuxt-ssr-slot-name="${slot}"[^>]*>`), (full) => {
|
||||
return full + teleports[key]
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user