Next.js Discord

Discord Forum

API_KEY exposed after build for extension

Unanswered
Little fire ant posted this in #help-forum
Open in Discord
Little fire antOP
All env are exposed in the build file after using next build && next export for extension. Is there any way to get the API_KEY at run time without using API. Because next js backend api not working after static build.

2 Replies

Little fire antOP
@Oriental Anyone?
I think this is what you want: https://www.npmjs.com/package/next-runtime-env