Bug: esbuild ignores sibling files
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
### Description:
In addition to the bundle produced by esbuild from my entrypoint, I'd like to include sibling files (like `collector.yaml` for configuring the [ADOT Layer](https://aws-otel.github.io/docs/getting-started/lambda/lambda-js)). If I put the file next to my entrypoint, it's ignored. If I put the file in `.aws-sam/build/MyFunction/` after `sam build` completes, it's deleted by `sam deploy`.
### Steps to reproduce:
1. Configure a CF template with ESbuild Metadata
2. Put `collector.yaml` in the same directory as the entrypoint
3. `sam build`
4. Observe that `collector.yaml` is not present in `.aws-sam/build/MyFunction`
5. Manually copy `collector.yaml` into `.aws-sam/build/MyFunction`
6. `sam deploy`
7. Observe that `.aws-sam/build/MyFunction/collector.yaml` has disappeared
8. Observe, via the AWS Console, that collector.yaml is not present in the Lambda
### Observed result:
I can include additional files in my lambda function.
### Expected result:
I can include additional files in my lambda function.
### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
1. OS: macOS Venture
5. `sam --version`: `SAM CLI, version 1.65.0`
10. AWS region: `us-east-1
`Add --debug flag to command you are running`
Contributor guide
Assessment
This issue has not been assessed yet.