Open jghaines opened 3 months ago
Hi @jghaines Thanks for the detailed reproduction steps! I was able to reproduce the issue and will mark it as a bug for the team to prioritize a fix
https://github.com/aws/aws-lambda-builders/issues/516 Looking into it a bit further this seems like it falls under this feature request.
Description:
Some npm packages, or lambda source modules, include bundled files.
When using
Metadata.BuildMethod: esbuild
these bundled files are not included in the deployment packageWhen using default javascript (without esbuild) these bundled files are correctly included.
Steps to reproduce:
The bug is revealed when using the following nodejs20.x sam-app-templates:
To each templated-app I add the npm module errorhandler which depends upon bundled
./public/*
files to initialise.Observed result:
Expected result:
Repeating the above steps with the default javascript app-template (no typescript/esbuild) works as expected:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Darwin Macbook2022.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112 arm64
sam --version
: SAM CLI, version 1.118.0