0
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?

AWS AmplipyにデプロイしたNext.jsのMiddlewareで、環境変数を参照する

Posted at

AWS Amplipyで環境変数を設定しても、デプロイしたNext.jsのMiddlewareで環境変数が参照されなかったので備忘録です。

next.configで以下のようにすれば読み込まれました。

Next.js
const nextConfig = {
    // =====省略
    env: {
        HOGE: process.env.HOGE,
    }
}

Vercelだと特に上記のようなことをしなくてもVercelの管理画面から設定した環境変数が参照されたので少し焦りました^^;

0
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
0
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?