From 94667cab907392af2c804fc756773395acd5bdd7 Mon Sep 17 00:00:00 2001 From: abeer0 <47961062+iiio2@users.noreply.github.com> Date: Sun, 19 Oct 2025 14:15:51 +0600 Subject: [PATCH 1/2] docs: replace legacy docker compose command (#20960) --- guide/env-and-mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guide/env-and-mode.md b/guide/env-and-mode.md index 0b22fea8..48cbfa29 100644 --- a/guide/env-and-mode.md +++ b/guide/env-and-mode.md @@ -109,7 +109,7 @@ VITE_FOO=foo${VITE_BAR} VITE_BAR=bar ``` -This does not work in shell scripts and other tools like `docker-compose`. +This does not work in shell scripts and other tools like `docker compose`. That said, Vite supports this behavior as this has been supported by `dotenv-expand` for a long time and other tools in JavaScript ecosystem uses older versions that supports this behavior. To avoid interop issues, it is recommended to avoid relying on this behavior. Vite may start emitting warnings for this behavior in the future. From 8ff3c5e684a2a9117517be234385d7f7710fc085 Mon Sep 17 00:00:00 2001 From: Kylin <1159469891@qq.com> Date: Mon, 20 Oct 2025 19:00:02 +0800 Subject: [PATCH 2/2] docs: update content --- guide/env-and-mode.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/guide/env-and-mode.md b/guide/env-and-mode.md index 01076140..d4b978c0 100644 --- a/guide/env-and-mode.md +++ b/guide/env-and-mode.md @@ -109,13 +109,8 @@ VITE_FOO=foo${VITE_BAR} VITE_BAR=bar ``` -<<<<<<< HEAD -这在 shell 脚本和其他工具(如 `docker-compose`)中不起作用。 +这在 shell 脚本和其他工具(如 `docker compose`)中不起作用。 不过,Vite 支持这种行为,因为 `dotenv-expand` 已经支持这种行为很长时间了,JavaScript 生态系统中的其他工具也使用支持这种行为的旧版本。 -======= -This does not work in shell scripts and other tools like `docker compose`. -That said, Vite supports this behavior as this has been supported by `dotenv-expand` for a long time and other tools in JavaScript ecosystem uses older versions that supports this behavior. ->>>>>>> 94667cab907392af2c804fc756773395acd5bdd7 为避免出现互操作问题,建议避免依赖这种行为。今后,Vite 可能会对这种行为发出警告。