fix: set default spaPreloaderOutside when compatibilityVersion: 4

This commit is contained in:
Daniel Roe 2024-11-27 14:02:44 +00:00
parent aa830c5274
commit 07cd634646
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -412,6 +412,10 @@ export default defineUntypedSchema({
* Keep showing the spa-loading-template until suspense:resolve * Keep showing the spa-loading-template until suspense:resolve
* @see [Nuxt Issues #24770](https://github.com/nuxt/nuxt/issues/21721) * @see [Nuxt Issues #24770](https://github.com/nuxt/nuxt/issues/21721)
*/ */
spaPreloaderOutside: false, spaPreloaderOutside: {
$resolve: async (val, get) => {
return val ?? ((await get('future') as Record<string, unknown>).compatibilityVersion === 4)
},
},
}, },
}) })