mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
fix(nuxt): handle unset spa-loading fallback (#23120)
This commit is contained in:
parent
28af761c74
commit
df6a992cd6
@ -420,6 +420,9 @@ function spaLoadingTemplate (nuxt: Nuxt) {
|
|||||||
return defaultSpaLoadingTemplate({})
|
return defaultSpaLoadingTemplate({})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nuxt.options.spaLoadingTemplate) {
|
||||||
console.warn(`[nuxt] Could not load custom \`spaLoadingTemplate\` path as it does not exist: \`${nuxt.options.spaLoadingTemplate}\`.`)
|
console.warn(`[nuxt] Could not load custom \`spaLoadingTemplate\` path as it does not exist: \`${nuxt.options.spaLoadingTemplate}\`.`)
|
||||||
|
}
|
||||||
|
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ export default defineUntypedSchema({
|
|||||||
* @type {string | boolean}
|
* @type {string | boolean}
|
||||||
*/
|
*/
|
||||||
spaLoadingTemplate: {
|
spaLoadingTemplate: {
|
||||||
$resolve: async (val, get) => typeof val === 'string' ? resolve(await get('srcDir'), val) : val
|
$resolve: async (val, get) => typeof val === 'string' ? resolve(await get('srcDir'), val) : val ?? null
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user