Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lambda-nodejs): Expose optional props for advanced usage of esbuild #12122

Closed
2 tasks
hassanazharkhan opened this issue Dec 17, 2020 · 1 comment · Fixed by #12123
Closed
2 tasks

feat(lambda-nodejs): Expose optional props for advanced usage of esbuild #12122

hassanazharkhan opened this issue Dec 17, 2020 · 1 comment · Fixed by #12123
Assignees
Labels
@aws-cdk/aws-lambda-nodejs feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@hassanazharkhan
Copy link
Contributor

hassanazharkhan commented Dec 17, 2020

This feature request is to add bundling props while bundling from local or docker build from esbuild, there are lots of features that needs to be exposed from aws-lambda-nodejs

Use Case

Like in my current use case I need to use tsconfig with the name tsconfig.release.json and I find out that the current implementation of esbuild is not allowing me to use so I ended up renaming my tsconfig just this.

once esbuild generates the bundled the there is no way to identify for users to view those bundled if required.

also good to have a meta file for the build to view stats of the bundler many tools support JSON meta-file i.e bundle buddy

Proposed Solution

// If the file is on root directory
const props: NodejsFunctionProps = {
             entry: `index.ts`,
             bundling: {
                 minify: false,
                 sourceMap: true,
                 metaFile: true,
                 tsConfig: 'tsconfig.release.json'
             },
         }

Other

// If the file is not on root directory and src folder
const props: NodejsFunctionProps = {
             entry: `index.ts`,
             bundling: {
                 minify: false,
                 sourceMap: true,
                 metaFile: true,
                 tsConfig: 'src/tsconfig.release.json'
             },
         }
  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@hassanazharkhan hassanazharkhan added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 17, 2020
@hassanazharkhan hassanazharkhan changed the title (module name): short issue description feat(lambda-nodejs): Expose optional props for advanced usage of esbuild Dec 17, 2020
@mergify mergify bot closed this as completed in #12123 Dec 21, 2020
mergify bot pushed a commit that referenced this issue Dec 21, 2020
…ild (#12123)

1. Normally the build API automatically discovers tsconfig.json files and reads their contents during a build. However, we can also configure a custom tsconfig.json file to use instead for advanced use cases.
 
2. Added option to generate meta-file.

3. Added option to add comments in the bundled files 

Closes [12122](#12122)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

flochaz pushed a commit to flochaz/aws-cdk that referenced this issue Jan 5, 2021
…ild (aws#12123)

1. Normally the build API automatically discovers tsconfig.json files and reads their contents during a build. However, we can also configure a custom tsconfig.json file to use instead for advanced use cases.
 
2. Added option to generate meta-file.

3. Added option to add comments in the bundled files 

Closes [12122](aws#12122)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants