Ross Gerbasi
03/14/2022, 8:29 PMcommandHooks
(https://docs.serverless-stack.com/constructs/Function#commandhooks) supposed to be run? I have a simple api with a custom lambda like this
const api = new sst.Api(this, 'Api', {
routes: {
'GET /': new Function(this, 'MyFunc', {
handler: 'src/lambda.handler',
bundle: {
commandHooks: {
beforeInstall() {
console.log('before install')
return [' echo beforeInstall']
},
beforeBundling(_, outDir) {
console.log('before bundle', outDir)
return [' echo beforeBundle']
},
afterBundling() {
console.log('after bundle')
return ['echo afterBundle']
},
},
},
}),
},
})
but I am not seeing those logs or echo's. How do ya get these things to run? Maybe this only runs on deploy...thdxr
03/14/2022, 8:41 PMFrank
sst start
?