From 313f6a9ebcd44bd5ff48a54fc869e2f407ece4d5 Mon Sep 17 00:00:00 2001 From: Thomas Dekiere Date: Fri, 13 Dec 2024 19:20:33 +0100 Subject: [PATCH] docs(core): fix syntax to specify configuration flag (#29223) ```sh nx build app --development ``` should be ```sh nx build app --configuration development ``` Co-authored-by: Isaac Mann --- docs/shared/guides/define-environment-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/shared/guides/define-environment-variables.md b/docs/shared/guides/define-environment-variables.md index 752726391d..e3b5b5ebbc 100644 --- a/docs/shared/guides/define-environment-variables.md +++ b/docs/shared/guides/define-environment-variables.md @@ -58,7 +58,7 @@ for workspace-specific settings (like the [Nx Cloud token](/ci/recipes/security/ Nx will only load environment variable files for a particular configuration if that configuration is defined for a task, even if you specify that configuration name from the command line. So if there is no `development` configuration defined for the `app`'s `build` task, the following command will use `.env.build` instead of `.env.build.development`: ```shell -nx build app --development +nx build app --configuration development ``` In order to have Nx actually use the `.env.build.development` environment variables, the `development` configuration needs to be set for the task (even if it is empty).