aws / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
6.52k stars 1.17k forks source link

Feature request: Add esbuild support for Lambda Layers #6531

Open dmsmds opened 10 months ago

dmsmds commented 10 months ago

Describe your idea/feature/enhancement

I wish SAM templates supported esbuild as a BuildMethod in the MetaData field for Lambda Layers

Proposal

I'm creating an official issue as it has been shown that Layers currently do not support esbuild, as per this issue comment[1].

Things to consider:

  1. Will this require any updates to the SAM Spec < Possibly

As per [1]: "Layers support is also something we're working on and unfortunately is not currently supported. This one requires us to address some technical challenges surrounding the way that the esbuild external API rewrites import paths"

Additional Details

References: [1] https://github.com/aws/aws-sam-cli/issues/3700#issuecomment-1060980088

mildaniel commented 10 months ago

Thanks for creating the request @dmsmds! We will review the request for prioritization.

eydelrivero commented 4 months ago

Is there any progress on this one 👀 ? In the meantime, what would be the recommended workaround to use TypeScript with lambda layers? ...any example repo would be highly appreciated 🙏