mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
docs: update custom environment example
This commit is contained in:
parent
4491c42232
commit
c32969327f
@ -33,7 +33,6 @@ You don't have to use TypeScript to build an application with Nuxt. However, it
|
||||
You can configure fully typed, per-environment overrides in your nuxt.config
|
||||
|
||||
```ts twoslash [nuxt.config.ts]
|
||||
// @errors: 2353
|
||||
export default defineNuxtConfig({
|
||||
$production: {
|
||||
routeRules: {
|
||||
@ -43,13 +42,15 @@ export default defineNuxtConfig({
|
||||
$development: {
|
||||
//
|
||||
},
|
||||
$myCustomName: {
|
||||
//
|
||||
$env: {
|
||||
staging: {
|
||||
//
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
To select an environment when running a Nuxt CLI command, simply pass the name to the `--envName` flag, like so: `nuxi build --envName myCustomName`.
|
||||
To select an environment when running a Nuxt CLI command, simply pass the name to the `--envName` flag, like so: `nuxi build --envName staging`.
|
||||
|
||||
To learn more about the mechanism behind these overrides, please refer to the `c12` documentation on [environment-specific configuration](https://github.com/unjs/c12?tab=readme-ov-file#environment-specific-configuration).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user