fix(nuxt): respect baseUrl within server components (#25727)

This commit is contained in:
Marc Cremer 2024-03-15 17:16:41 +01:00 committed by GitHub
parent 0d5b3c18e0
commit 6439244c96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,7 @@ import { prerenderRoutes, useRequestEvent } from '../composables/ssr'
import { getFragmentHTML } from './utils'
// @ts-expect-error virtual file
import { remoteComponentIslands, selectiveClient } from '#build/nuxt.config.mjs'
import { appBaseURL, remoteComponentIslands, selectiveClient } from '#build/nuxt.config.mjs'
const pKey = '_islandPromises'
const SSR_UID_RE = /data-island-uid="([^"]*)"/
@ -28,7 +28,7 @@ const getId = import.meta.client ? () => (id++).toString() : randomUUID
const components = import.meta.client ? new Map<string, Component>() : undefined
async function loadComponents (source = '/', paths: NuxtIslandResponse['components']) {
async function loadComponents (source = appBaseURL, paths: NuxtIslandResponse['components']) {
const promises = []
for (const component in paths) {