From 85f2788eb4461abdeb3b701a3e5a60fbee726837 Mon Sep 17 00:00:00 2001 From: "Michael S. Fischer" Date: Sun, 20 Jan 2019 12:40:17 -0800 Subject: [PATCH] fix(app): add source map support to TypeScript apps 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 #1579 --- .../lib/init-templates/app/typescript/bin/%name%.template.ts | 1 + .../lib/init-templates/app/typescript/package.template.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts b/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts index 985ea7add8f96..4e712351b19ce 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts +++ b/packages/aws-cdk/lib/init-templates/app/typescript/bin/%name%.template.ts @@ -1,4 +1,5 @@ #!/usr/bin/env node +import 'source-map-support/register'; import cdk = require('@aws-cdk/cdk'); import { %name.PascalCased%Stack } from '../lib/%name%-stack'; diff --git a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json index a31c23f15a814..c705b158b8883 100644 --- a/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json +++ b/packages/aws-cdk/lib/init-templates/app/typescript/package.template.json @@ -15,6 +15,7 @@ "aws-cdk": "^%cdk-version%" }, "dependencies": { - "@aws-cdk/cdk": "^%cdk-version%" + "@aws-cdk/cdk": "^%cdk-version%", + "source-map-support": "^0.5.9" } }