mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-22 19:32:40 +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(() => '')
|
const spaTemplate = await import('#spa-template').then(r => r.template).catch(() => '')
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
if (spaPreloaderOutside) {
|
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 appTemplate = APP_ROOT_OPEN_TAG + APP_ROOT_CLOSE_TAG
|
||||||
const loaderTemplate = r ? APP_SPA_LOADER_OPEN_TAG + r + APP_SPA_LOADER_CLOSE_TAG : ''
|
const loaderTemplate = r ? APP_SPA_LOADER_OPEN_TAG + r + APP_SPA_LOADER_CLOSE_TAG : ''
|
||||||
return appTemplate + loaderTemplate
|
return appTemplate + loaderTemplate
|
||||||
@ -230,9 +232,6 @@ async function getIslandContext (event: H3Event): Promise<NuxtIslandContext> {
|
|||||||
return ctx
|
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 HAS_APP_TELEPORTS = !!(appTeleportTag && appTeleportAttrs.id)
|
||||||
const APP_TELEPORT_OPEN_TAG = HAS_APP_TELEPORTS ? `<${appTeleportTag}${propsToString(appTeleportAttrs)}>` : ''
|
const APP_TELEPORT_OPEN_TAG = HAS_APP_TELEPORTS ? `<${appTeleportTag}${propsToString(appTeleportAttrs)}>` : ''
|
||||||
const APP_TELEPORT_CLOSE_TAG = HAS_APP_TELEPORTS ? `</${appTeleportTag}>` : ''
|
const APP_TELEPORT_CLOSE_TAG = HAS_APP_TELEPORTS ? `</${appTeleportTag}>` : ''
|
||||||
|
Loading…
Reference in New Issue
Block a user