mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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({})
|
||||
}
|
||||
|
||||
console.warn(`[nuxt] Could not load custom \`spaLoadingTemplate\` path as it does not exist: \`${nuxt.options.spaLoadingTemplate}\`.`)
|
||||
if (nuxt.options.spaLoadingTemplate) {
|
||||
console.warn(`[nuxt] Could not load custom \`spaLoadingTemplate\` path as it does not exist: \`${nuxt.options.spaLoadingTemplate}\`.`)
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ export default defineUntypedSchema({
|
||||
* @type {string | boolean}
|
||||
*/
|
||||
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