Skip to content

Latest commit

History

History
10 lines (8 loc) 路 654 Bytes

2022-04-22.md

File metadata and controls

10 lines (8 loc) 路 654 Bytes
publish_date tags
2022-04-22
nextjs
  • You cant destructure process.env in next.js apps

Note: In order to keep server-only secrets safe, Next.js replaces聽process.env.*聽with the correct values at build time. This means that聽process.env聽is not a standard JavaScript object, so you鈥檙e not able to use聽object destructuring. Environment variables must be referenced as e.g.聽process.env.PUBLISHABLE_KEY,聽notconst { PUBLISHABLE_KEY } = process.env.