mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-22 11:22:43 +00:00
chore: initialise strings within spa template
This commit is contained in:
parent
e1c89beb56
commit
aa830c5274
@ -146,6 +146,8 @@ const getSPARenderer = lazyCachedFunction(async () => {
|
||||
const spaTemplate = await import('#spa-template').then(r => r.template).catch(() => '')
|
||||
.then((r) => {
|
||||
if (spaPreloaderOutside) {
|
||||
const APP_SPA_LOADER_OPEN_TAG = `<${appSpaLoaderTag}${propsToString(appSpaLoaderAttrs)}>`
|
||||
const APP_SPA_LOADER_CLOSE_TAG = `</${appSpaLoaderTag}>`
|
||||
const appTemplate = APP_ROOT_OPEN_TAG + APP_ROOT_CLOSE_TAG
|
||||
const loaderTemplate = r ? APP_SPA_LOADER_OPEN_TAG + r + APP_SPA_LOADER_CLOSE_TAG : ''
|
||||
return appTemplate + loaderTemplate
|
||||
@ -230,9 +232,6 @@ async function getIslandContext (event: H3Event): Promise<NuxtIslandContext> {
|
||||
return ctx
|
||||
}
|
||||
|
||||
const APP_SPA_LOADER_OPEN_TAG = `<${appSpaLoaderTag}${propsToString(appSpaLoaderAttrs)}>`
|
||||
const APP_SPA_LOADER_CLOSE_TAG = `</${appSpaLoaderTag}>`
|
||||
|
||||
const HAS_APP_TELEPORTS = !!(appTeleportTag && appTeleportAttrs.id)
|
||||
const APP_TELEPORT_OPEN_TAG = HAS_APP_TELEPORTS ? `<${appTeleportTag}${propsToString(appTeleportAttrs)}>` : ''
|
||||
const APP_TELEPORT_CLOSE_TAG = HAS_APP_TELEPORTS ? `</${appTeleportTag}>` : ''
|
||||
|
Loading…
Reference in New Issue
Block a user