From 5df22d91d34235e06e2fbcd77bb5cf6475560c10 Mon Sep 17 00:00:00 2001 From: "Michael S. Fischer" Date: Mon, 4 Feb 2019 04:59:10 -0800 Subject: [PATCH] feat(app): add source map support to TS app template (#1581) 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" } }