Skip to content

Commit 2a56db0

Browse files
authored
docs: env expand feature only works for variables in env files (#1611)
resolve #1607 vitejs/vite@e9c9767 の反映です。
1 parent f1ea7e4 commit 2a56db0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guide/env-and-mode.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ console.log(import.meta.env.DB_PASSWORD) // undefined
5555
上に示したように、`VITE_SOME_KEY` は数値ですが、パースすると文字列が返ります。同じことはブール型の環境変数にも起こります。コード内で使用する場合には、必ず目的の型に変換するようにしてください。
5656
:::
5757
58-
また、Vite は [dotenv-expand](https://github.com/motdotla/dotenv-expand) を使って、設定不要で変数を展開できます。構文の詳細については、[ドキュメント](https://github.com/motdotla/dotenv-expand#what-rules-does-the-expansion-engine-follow)を参照してください。
58+
また、Vite は [dotenv-expand](https://github.com/motdotla/dotenv-expand) を使って、設定不要で env ファイルに書かれた変数を展開できます。構文の詳細については、[ドキュメント](https://github.com/motdotla/dotenv-expand#what-rules-does-the-expansion-engine-follow)を参照してください。
5959
6060
環境値の中で `$` を使用する場合は、`\` でエスケープする必要があることに注意してください。
6161

0 commit comments

Comments
 (0)