mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 09:55:53 +00:00
fix(nuxt): prefix server component ids to avoid collisions (#21472)
This commit is contained in:
parent
32c8e3bf27
commit
ed5732196d
@ -18,7 +18,7 @@ const SLOT_FALLBACK_RE = /<div nuxt-slot-fallback-start="([^"]*)"[^>]*><\/div>((
|
|||||||
const SSR_UID_RE = /nuxt-ssr-component-uid="([^"]*)"/
|
const SSR_UID_RE = /nuxt-ssr-component-uid="([^"]*)"/
|
||||||
|
|
||||||
let id = 0
|
let id = 0
|
||||||
const getId = process.client ? () => (id++).toString() : randomUUID
|
const getId = process.client ? () => 's' + (id--) : randomUUID
|
||||||
|
|
||||||
export const createServerComponent = (name: string) => {
|
export const createServerComponent = (name: string) => {
|
||||||
return defineComponent({
|
return defineComponent({
|
||||||
|
Loading…
Reference in New Issue
Block a user