Skip to content

Instantly share code, notes, and snippets.

@SooJungChae
Last active August 19, 2021 06:28
Show Gist options
  • Save SooJungChae/16a52f1312f1dec96f47723cd659918d to your computer and use it in GitHub Desktop.
Save SooJungChae/16a52f1312f1dec96f47723cd659918d to your computer and use it in GitHub Desktop.
Next.js environment order test

env.local overwrites env.development / env.production overwrites env

env.test overwrites all when test environment (jest, sentry...)


env.local apply values on every environment (except .env.test? test later...)

env.development apply values when npm run dev

env.production apply values when npm run build && npm run start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment