Merge branch 'main' into fix/21721-spa-loading

This commit is contained in:
Nikolay 2024-11-05 21:23:53 +07:00 committed by GitHub
commit aed521278b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -117,7 +117,7 @@ Be very careful before proxying headers to an external API and just include head
::tip
You can also use [`useRequestFetch`](/docs/api/composables/use-request-fetch) to proxy headers to the call automatically.
:::
::
## `useFetch`

View File

@ -158,7 +158,7 @@ export default defineEventHandler((event) => {
})
```
::tip
::tip{to="https://h3.unjs.io/examples/validate-data#validate-params"}
Alternatively, use `getValidatedRouterParams` with a schema validator such as Zod for runtime and type safety.
::

View File

@ -58,8 +58,8 @@ export async function getNuxtModuleVersion (module: string | NuxtModule, nuxt: N
}
// it's possible that the module will be installed, it just hasn't been done yet, preemptively load the instance
if (hasNuxtModule(moduleMeta.name)) {
const { buildTimeModuleMeta } = await loadNuxtModuleInstance(moduleMeta.name, nuxt)
return buildTimeModuleMeta.version || false
const { nuxtModule, buildTimeModuleMeta } = await loadNuxtModuleInstance(moduleMeta.name, nuxt)
return buildTimeModuleMeta.version || await nuxtModule.getMeta?.().then(r => r.version) || false
}
return false
}