aws-toolkit-vscode icon indicating copy to clipboard operation
aws-toolkit-vscode copied to clipboard

Allow inline sourcemaps for EsBuild

Open ffMathy opened this issue 2 years ago • 1 comments

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.

ffMathy avatar Mar 29 '23 12:03 ffMathy

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

justinmk3 avatar Mar 05 '24 14:03 justinmk3