aws / aws/aws-sam-cli

Support BuildProperties/BuildMethod config for multiple functions

Open
#3,713 9 comments 20 reactions 0 assignees View on GitHub
area/build area/node-npm type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Describe your idea/feature/enhancement

Hey folks, super pumped about the new typescript + esbuild feature. One annoying thing I noticed is that for every function resource, I have to specify a metadata field with the esbuild options. You can imagine how repetitive this can get with multiple functions.

e.g.

```yaml
Metadata: # Manage esbuild properties
BuildMethod: esbuild
BuildProperties:
Minify: true
Target: 'es2020'
Sourcemap: true
EntryPoints:
- index.ts
```

### Proposal

Would be awesome if we could somehow add this to the `Globals` section of the sam template. e.g If I wanted to use esbuild for all my functions.

The same would be great to have for LayerVersion.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.