-
Notifications
You must be signed in to change notification settings - Fork 4.4k
(aws-lambda-nodejs): support full configuration for source maps in esbuild options #14857
Description
Currently, there is only support for passing in sourceMap: boolean https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda-nodejs.BundlingOptions.html#sourcemap into the bundling options in the @aws-cdk/aws-lambda-nodejs NodejsFunction. The documentation for sourceMaps in esbuild can be found here https://esbuild.github.io/api/#sourcemap
I would like to be able to pass in any of the options inline external both
Use Case
I am trying to set up Sentry, an error monitoring service for my lambdas but it is not correctly picking up the source maps for my compiled Typescript files. It requires the source maps to be inline https://docs.sentry.io/platforms/node/guides/aws-lambda/typescript/
Proposed Solution
Change the type of sourceMap: boolean to sourceMap: 'inline' | 'external' | 'both' | boolean here https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda-nodejs.BundlingOptions.html#sourcemap
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request