InterviewBuddy
All interview questions

How do you avoid exposing a secret in a Next.js bundle?

Advanced

Answer

Keep secret values in server-only modules and never prefix them with NEXT_PUBLIC_. Audit imports so client components do not pull privileged code into the browser.