From c32969327f87cf655e353628fd06801ad23ff40c Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 8 Nov 2024 21:46:48 +0000 Subject: [PATCH] docs: update custom environment example --- docs/1.getting-started/3.configuration.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/1.getting-started/3.configuration.md b/docs/1.getting-started/3.configuration.md index 57eb019f6c..80b379e3d8 100644 --- a/docs/1.getting-started/3.configuration.md +++ b/docs/1.getting-started/3.configuration.md @@ -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).