docs: clarify that app config is not available (yet) in nitro (#19200)

This commit is contained in:
ML 2023-02-22 06:50:14 +01:00 committed by GitHub
parent 185ae9fd2c
commit 2359b43aa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -35,7 +35,11 @@ export default defineAppConfig({
})
```
When adding `theme` to the `app.config`, Nuxt uses Vite or webpack to bundle the code. We can universally access `theme` in both server and browser using [useAppConfig](/docs/api/composables/use-app-config) composable.
When adding `theme` to the `app.config`, Nuxt uses Vite or webpack to bundle the code. We can universally access `theme` both when server-rendering the page and in the browser using [useAppConfig](/docs/api/composables/use-app-config) composable.
::alert{type=info}
Support for accessing `useAppConfig()` in Nitro and `server` directory is [coming soon](https://github.com/nuxt/nuxt/issues/14670).
::
```js
const appConfig = useAppConfig()