You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/tutorial/04-advanced-sveltekit/05-environment-variables/01-env-static-private/README.md
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,20 @@
2
2
title: $env/static/private
3
3
---
4
4
5
-
Environment variables — like API keys and database credentials — can be added to a `.env`file, and they will be made available to your application.
5
+
API キーやデータベースの認証情報などの環境変数は `.env`ファイルに追加することでき、アプリケーションから使えるようになります。
6
6
7
-
> You can also use `.env.local`or`.env.[mode]`files — see the [Vite documentation](https://vitejs.dev/guide/env-and-mode.html#env-files)for more information). Make sure you add any files containing sensitive information to your `.gitignore`file!
In turn, these modules can only be imported by _other_ server modules.
76
+
同様に、これらのモジュールは他のサーバーモジュールにのみインポートすることができます。
77
77
78
78
## Static vs dynamic
79
79
80
-
The `static` in `$env/static/private`indicates that these values are known at build time, and can be _statically replaced_. This enables useful optimisations:
//code in here will be removed from the build output
87
-
//if FEATURE_FLAG_X is not enabled
86
+
//FEATURE_FLAG_X が enabled でない場合、
87
+
//ここにあるコードはビルド出力から削除されます
88
88
}
89
89
```
90
90
91
-
In some cases you might need to refer to environment variables that are _dynamic_ — in other words, not known until we run the app. We'll cover this case in the next exercise.
Copy file name to clipboardExpand all lines: content/tutorial/04-advanced-sveltekit/05-environment-variables/02-env-dynamic-private/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: $env/dynamic/private
3
3
---
4
4
5
-
If you need to read the values of environment variables when the app runs, as opposed to when the app is built, you can use `$env/dynamic/private`instead of `$env/static/private`:
Copy file name to clipboardExpand all lines: content/tutorial/04-advanced-sveltekit/05-environment-variables/04-env-dynamic-public/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: $env/dynamic/public
3
3
---
4
4
5
-
As with [private environment variables](/tutorial/env-static-private), it's preferable to use static values if possible, but if necessary we can use dynamic values instead:
0 commit comments