-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
fix(app): add source map support to TypeScript apps #1581
Conversation
c0ef0d5
to
cb248d6
Compare
But I seem to recall we disabled this on purpose, I just don't remember why. @eladb, do you? You can also get source map support by default on your machine by setting the following environment variable:
No need to change any files. |
Source map support makes sense only if you actually have the sources on your machine, and most of our users don’t have them available. Moreover, there isn’t uncommon in the JavaScript world to source locations in stack trace output to jump into the JavaScript code, add a “printf debug” in order to diagnose a problem. We can totally recommend Rico’s approach in our contribution guide for people who are debugging with sources |
Although all I guess we might enable it by default from the toolkit or sth? |
I'm a bit puzzled here. The context in question is a TypeScript app. When will one not have the sources for one's own app and its dependencies? Having the correct lines in the stack trace, especially when the trace results from an error in user code (stacks, libs, etc.), makes for a pleasant UX. If it's possible to make this easy, let's make it work out of the box by default instead of asking the customer to do any gymnastics. |
Add source map support to the TypeScript app entry point template. This won't retroactively fix existing CDK apps, but it will ensure that apps generated in the future via `cdk init --app` will have it enabled. Fixes aws#1579
cb248d6
to
85f2788
Compare
@rix0rrr Added |
I actually also feel we can merge this. It's what most people are going to want, and those that don't will be savvy enough to remove it. |
okay by me |
Add source map support to the TypeScript app entry point template. This won't retroactively fix existing CDK apps, but it will ensure that apps generated in the future via `cdk init --app` will have it enabled. Fixes aws#1579
Add source map support to the TypeScript app entry point template.
This won't retroactively fix existing CDK apps, but it will ensure
that apps generated in the future via
cdk init --app
will haveit enabled.
Fixes #1579
Pull Request Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.