mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-22 11:22:43 +00:00
Merge branch 'main' into fix/21721-spa-loading
This commit is contained in:
commit
aed521278b
@ -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`
|
||||
|
||||
|
@ -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.
|
||||
::
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user