docs: add note for bridge users about defineNuxtPlugin (#2166)

This commit is contained in:
Daniel Roe 2021-11-29 10:50:49 +00:00 committed by GitHub
parent 010febd1b3
commit 2904bfaf34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,6 +189,10 @@ export default defineNuxtPlugin(nuxtApp => {
}) })
``` ```
::alert
If you want to use the new Nuxt composables (such as `useNuxtApp` or `useRuntimeConfig`) within your plugins, you will need to use the `defineNuxtPlugin` helper for those plugins.
::
## New `useMeta` (optional) ## New `useMeta` (optional)
Nuxt Bridge provides a new Nuxt 3 meta API that can be accessed with a new `useMeta` composable. Nuxt Bridge provides a new Nuxt 3 meta API that can be accessed with a new `useMeta` composable.