Skip to content

Commit

Permalink
docs(configuration): add --envName flag
Browse files Browse the repository at this point in the history
Documentation accompanying the PR for Nuxt CLI: nuxt/cli#424 (currently in review)
  • Loading branch information
tillsanders committed Sep 10, 2024
1 parent 06337da commit f0d6e73
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/1.getting-started/3.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@ export default defineNuxtConfig({
},
$development: {
//
}
},
$myCustomName: {
//
},
})
```

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 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).

::tip{icon="i-ph-video-duotone" to="https://www.youtube.com/watch?v=DFZI2iVCrNc" target="_blank"}
Watch a video from Alexander Lichter about the env-aware `nuxt.config.ts`.
::
Expand Down

0 comments on commit f0d6e73

Please sign in to comment.