Skip to content

Commit

Permalink
docs: describe environment override feature (nuxt#21879)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityarawat1223 authored Jul 1, 2023
1 parent 87e01cc commit 6cf762f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/1.getting-started/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ Every configuration option is described in the [Configuration Reference](/docs/a
You don't have to use TypeScript to build an application with Nuxt. However, it is strongly recommended to use the `.ts` extension for the `nuxt.config` file. This way you can benefit from hints in your IDE to avoid typos and mistakes while editing your configuration.
::

### Environment overrides

You can configure fully typed, per-environment overrides in your nuxt.config

```ts [nuxt.config.ts]
export default defineNuxtConfig({
$production: {
routeRules: {
'/**': { isr: true }
}
},
$development: {
//
}
})
```

::alert{type=info}
If you're authoring layers, you can also use the `$meta` key to provide metadata that you or the consumers of your layer might use.
::

### Environment Variables and Private Tokens

The `runtimeConfig` API exposes values like environment variables to the rest of your application. By default, these keys are only available server-side. The keys within `runtimeConfig.public` are also available client-side.
Expand Down

0 comments on commit 6cf762f

Please sign in to comment.