2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

import.meta.envとprocess.envの違い

2
Posted at

import.meta.env

  • 特定の定数をクライアントサイドアプリをビルドした時、tree shakingして暗イアントサイドアプリのソースコード内に保持する
  • クライアントアプリのコードに埋め込みされるため、公開されて問題ないもののみ含める

process.env

  • nodejsのプロセス起動時に環境変数(OSで持っている)を、nodejsプロセスから読み取れるようにするもの
  • 基本的にnodejsはサーバーサイドで実行されるので、公開されて困るものはこちらで対応する

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?