diff --git a/packages/nuxt/src/app/components/nuxt-island.ts b/packages/nuxt/src/app/components/nuxt-island.ts
index b129f88dea..ef3f5e608e 100644
--- a/packages/nuxt/src/app/components/nuxt-island.ts
+++ b/packages/nuxt/src/app/components/nuxt-island.ts
@@ -126,7 +126,7 @@ export default defineComponent({
if (import.meta.client && !canLoadClientComponent.value) {
for (const [key, value] of Object.entries(payloadComponents || {})) {
- html = html.replace(new RegExp(` data-island-uid="${uid.value}" data-island-client="${key}"[^>]*>`), (full) => {
+ html = html.replace(new RegExp(` data-island-uid="${uid.value}" data-island-component="${key}"[^>]*>`), (full) => {
return full + value.html
})
}
@@ -267,7 +267,7 @@ export default defineComponent({
const { props } = info
const component = components!.get(id)!
// use different selectors for even and odd teleportKey to force trigger the teleport
- const vnode = createVNode(Teleport, { to: `${isKeyOdd ? 'div' : ''}[data-island-uid='${uid.value}'][data-island-client="${id}"]` }, {
+ const vnode = createVNode(Teleport, { to: `${isKeyOdd ? 'div' : ''}[data-island-uid='${uid.value}'][data-island-component="${id}"]` }, {
default: () => {
return [h(component, props)]
}
diff --git a/packages/nuxt/src/app/components/nuxt-teleport-island-client.ts b/packages/nuxt/src/app/components/nuxt-teleport-island-component.ts
similarity index 94%
rename from packages/nuxt/src/app/components/nuxt-teleport-island-client.ts
rename to packages/nuxt/src/app/components/nuxt-teleport-island-component.ts
index aca5f791ed..5d527c3bdb 100644
--- a/packages/nuxt/src/app/components/nuxt-teleport-island-client.ts
+++ b/packages/nuxt/src/app/components/nuxt-teleport-island-component.ts
@@ -14,7 +14,7 @@ type ExtendedComponent = Component & {
* this teleport the component in SSR only if it needs to be hydrated on client
*/
export default defineComponent({
- name: 'NuxtTeleportIslandClient',
+ name: 'NuxtTeleportIslandComponent',
props: {
to: {
type: String,
@@ -53,7 +53,7 @@ export default defineComponent({
return [h('div', {
style: 'display: contents;',
'data-island-uid': '',
- 'data-island-client': props.to
+ 'data-island-component': props.to
}, []), h(Teleport, { to: props.to }, slot)]
}
}
diff --git a/packages/nuxt/src/components/islandsTransform.ts b/packages/nuxt/src/components/islandsTransform.ts
index a3b6875b8f..9a84865007 100644
--- a/packages/nuxt/src/components/islandsTransform.ts
+++ b/packages/nuxt/src/components/islandsTransform.ts
@@ -13,7 +13,7 @@ import { isVue } from '../core/utils'
interface ServerOnlyComponentTransformPluginOptions {
getComponents: () => Component[]
/**
- * passed down to `NuxtTeleportIslandClient`
+ * passed down to `NuxtTeleportIslandComponent`
* should be done only in dev mode as we use build:manifest result in production
*/
rootDir?: string
@@ -33,7 +33,7 @@ const SCRIPT_RE = /`
- , 'hello.server.vue')
+ , 'hello.server.vue')
expect(normalizeLineEndings(result)).toMatchInlineSnapshot(`
"
@@ -74,7 +74,7 @@ describe('islandTransform - server and island components', () => {
`
- , 'hello.server.vue')
+ , 'hello.server.vue')
expect(normalizeLineEndings(result)).toMatchInlineSnapshot(`
"
@@ -106,7 +106,7 @@ describe('islandTransform - server and island components', () => {
`
- , 'hello.server.vue')
+ , 'hello.server.vue')
expect(normalizeLineEndings(result)).toMatchInlineSnapshot(`
"
@@ -171,7 +171,7 @@ describe('islandTransform - server and island components', () => {
@@ -205,16 +205,16 @@ describe('islandTransform - server and island components', () => {
expect(normalizeLineEndings(result)).toMatchInlineSnapshot(`
"
count: 0
This component should not be preloadedcount: 0
This component should not be preloadedcount: 0
This component should not be preloadedcount: 0
This component should not be preloadedcount: 0
This component should not be preloaded