Ya'll, the NextjsSite construct deploys the lambas...
# general
s
Ya'll, the NextjsSite construct deploys the lambas via an S3 Asset and then does environment variable replacement. I understand the need to inline the environment variables via a find and replace. Is this specific strategy required so that the environment variables don't end up in the build artifacts? Just wondering if a simpler strategy such as Esbuild's define argument could be used instead.
t
the issue is the variable values aren't know at synth time
Only after deployment
s
Aha, of course. Makes sense.
Thanks for the insight
You had to jump through hoops to make that work. Along with the any base region deployments. Wow. That stuff is complicated
Amazing how much complexity these constructs hide away with a simple API
t
yeah the nextjs one is particularly insane