serverless-esbuild icon indicating copy to clipboard operation
serverless-esbuild copied to clipboard

Serverless Packaging - Individual function packages is not working with serverless-esbuild plugin

Open joseph-so opened this issue 2 years ago • 0 comments

Describe the bug According to README.md and https://www.serverless.com/plugins/serverless-esbuild, Serverless packing is supported.

I am migrating my project from serverless-plugins-typescript to serverless-esbuild. The project I am working on is a SOAP client, so I need to include the WSDL file to the corresponding lambda. serverless-pluins-typescript can handle the additional ndividual function packages correctly while serverless-esbuild failed to do so. I need to use the Root level package to include the wsdl file (so it will be included for all lambda)

To Reproduce Using https://github.com/floydspace/serverless-esbuild/tree/master/examples/minimal to start a new project

  1. Add a folder call wsdl
  2. Add a file under wsdl - let say test.wsdl
  3. In serverless.yaml, under handler: index.handler , add `package: patterns:
    • ./wsdl/test.wsdl`
  4. Deploy it
  5. Go to AWS Lambda console to download the developed package
  6. Did not include the wsdl folder and the file

Expected behavior Include the wsdl folder and the file

Versions (please complete the following information):

  • OS: Mac / Linux (Codebuild)
  • Serverless Framework Version: 3.22.0
  • Plugin Version: 1.42.0

Current workaround Add the package patterns in the root level

joseph-so avatar Mar 23 '23 03:03 joseph-so