how do you pass vars like cognito user pool, appsy...
# guide
m
how do you pass vars like cognito user pool, appsync url, etc from serverless infra to nextjs? is this the best way to do it? https://docs.serverless-stack.com/constructs/NextjsSite#environment-variables are there any helpers for reading in the vars or should i make my own?
f
Hey @Mischa Spiegelmock, 2 things worth mentioned: 1. prefix the env vars with NEXT_PUBLIC_ if the values need to be exposed on the frontend 2. the environment variables specific here won’t work for static generated pages, b/c the pages are generated at build time, but the environment values are resolved at deploy time.
m
thx!