sorry to be needy today! :grimacing: anyone have t...
# help
j
sorry to be needy today! 😬 anyone have tips for working with Lambda@Edge? I don’t think that SST’s magic debugging will work for edge lambdas, right? I’m using cloudfront.experimental.EdgeFunction, which seems to be working but I have 2 challenges 1. It looks like I’m not allowed to use env vars on edge functions which is crazy, any workaround? 2. I have to bundle it myself, so I’m running
esbuild
, which is working, but is there a way to automatically run this esbuild command before every deployment?
d
I believe esbuild has a text replacer built into it. It’s essentially the same as env variables, but the values are directly put into the code. (1)
You could just use
npm
s auto commands and use
pre
. As in, if your command were
deploy
, you can make a command named
predeploy
and it would run before it. (2)