questions about makeEnvPublic and EnvScript #105
Unanswered
aNyMoRe0505
asked this question in
Q&A
Replies: 1 comment
-
It results in the same and both should work fine. We prefer |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thank you for creating this library. I have a few small questions I'd like to clarify.
makeEnvPublic seems to be used when you want to expose some server variables to the public.
So, you can use
makeEnvPublic('FOO')
and then in the client component useenv('NEXT_PUBLIC_FOO')
.My question is, can't we achieve the same effect directly with EnvScript like this:
And then in the client component just
env('NEXT_PUBLIC_FOO')
So, why do we still need makeEnvPublic ?
Beta Was this translation helpful? Give feedback.
All reactions