serverless-esbuild: Missing wrapper function

Hello,

When I do sls deploy, the bundle is correctly built however the handler is set to s_function.handler for a function located in let’s say src/function.js. It works if I manually rename it to src/function.handler in the AWS console but it gets overwritten after every deploy.

I can reproduce that with any of the esbuild starter I have found. Even with https://github.com/floydspace/serverless-esbuild/tree/master/examples/minimal

Note that when doing sls package or sls deploy, I can see the file s_function.handler being created then deleted on my root dir.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 16

Most upvoted comments

Quick update, for some reason setting package individually: true the final zip is missing some node_module dependencies like pg, package.json, package-lock etc

That is likely related to https://github.com/floydspace/serverless-esbuild/pull/249. Working on it. Time is scarce for me though.

Quick update, for some reason setting package individually: true the final zip is missing some node_module dependencies like pg, package.json, package-lock etc

That’s unfortunate, serverless-webpack works, so I wonder if serverless framework hard coded serverless-weback to run before the dashboard plugin.