aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.46k stars 394 forks source link

Allow inline sourcemaps for EsBuild #3286

Open ffMathy opened 1 year ago

ffMathy commented 1 year ago

Problem

According to https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-build-typescript.html, Sourcemap can only be set to true or false.

This is causing issues with devcontainer debug functionality in TypeScript: #3266

If only Sourcemap could be set to inline or both as supported in the documentation, it would solve that issue: https://esbuild.github.io/api/#sourcemap

Expected behavior

I expect Sourcemap to be able to set to the valid values of the property in Esbuild.

justinmk3 commented 5 months ago

Sourcemap can only be set to true or false. ... If Sourcemap could be set to inline or both as supported in the documentation, it would solve that issue: https://esbuild.github.io/api/#sourcemap

The SAM CLI Sourcemap option is just a way to send NODE_OPTIONS: --enable-source-maps . Is there a NODE_OPTIONS flag that is equivalent to what you're suggesting?

I expect Sourcemap to be able to set to the valid values of the property in Esbuild.

That would need to be requested in https://github.com/aws/aws-sam-cli