also.. with Serverless Framework, I had set up an ...
# help
s
also.. with Serverless Framework, I had set up an esbuild plugin so it would dump all the source code & source maps to a specific folder, so I could use the Sentry CLI to upload those sources + maps upon code build/deploy. how would I go about doing this with SST?
looks like
esbuildConfig
is the way to go here, to add esbuild plugins. https://docs.serverless-stack.com/installation#project-config this raises a similar question: does SST itself support plugins? any way we can hook into the deploy process with
before
or
after
hooks?
f
That’s right, you can use your plugins with
esbuildConfig
. As for SST itself, you can set
commandHooks
to hook into before/after bundling for each function - https://docs.serverless-stack.com/constructs/Function#commandhooks
s
@Frank just circling back to this. is there a way to hook into after the entire SST deploy process is done? I mean, I realize I could just make a script that does
yarn deploy
then
whatever_script
😄 but just wondering, anyway
f
Not currently. We’ve been getting requests for this (ie. run DB migration after deploy).
That
whatever_script
, what does it do? Does it need to call AWS services? Does it need to call something inside VPC that you don’t have access to locally?
s
upload source maps to Sentry. so a
sentry-cli
call. no big deal, I currently have that in a shell script with my other projects
f
Ah, got it.