From 28d230f946df6cbcc8173822494b50cd056ef63c Mon Sep 17 00:00:00 2001 From: Adrien Cacciaguerra Date: Thu, 16 Sep 2021 08:51:03 +0200 Subject: [PATCH] feat(Templates): Improve source maps handling in `aws-nodejs-typescript` (PR #9961) --- .../create/templates/aws-nodejs-typescript/package.json | 3 +-- .../create/templates/aws-nodejs-typescript/serverless.ts | 1 + .../aws-nodejs-typescript/src/functions/hello/handler.ts | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/plugins/create/templates/aws-nodejs-typescript/package.json b/lib/plugins/create/templates/aws-nodejs-typescript/package.json index 04a59b673ef..ae346d2d487 100644 --- a/lib/plugins/create/templates/aws-nodejs-typescript/package.json +++ b/lib/plugins/create/templates/aws-nodejs-typescript/package.json @@ -11,8 +11,7 @@ }, "dependencies": { "@middy/core": "^1.5.2", - "@middy/http-json-body-parser": "^1.5.2", - "source-map-support": "^0.5.19" + "@middy/http-json-body-parser": "^1.5.2" }, "devDependencies": { "@serverless/typescript": "^2.23.0", diff --git a/lib/plugins/create/templates/aws-nodejs-typescript/serverless.ts b/lib/plugins/create/templates/aws-nodejs-typescript/serverless.ts index 74a2a88a337..2b7ac634492 100644 --- a/lib/plugins/create/templates/aws-nodejs-typescript/serverless.ts +++ b/lib/plugins/create/templates/aws-nodejs-typescript/serverless.ts @@ -21,6 +21,7 @@ const serverlessConfiguration: AWS = { }, environment: { AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1', + NODE_OPTIONS: '--enable-source-maps --stack-trace-limit=1000', }, lambdaHashingVersion: '20201221', }, diff --git a/lib/plugins/create/templates/aws-nodejs-typescript/src/functions/hello/handler.ts b/lib/plugins/create/templates/aws-nodejs-typescript/src/functions/hello/handler.ts index 3b2c81cda68..2879ed490a1 100644 --- a/lib/plugins/create/templates/aws-nodejs-typescript/src/functions/hello/handler.ts +++ b/lib/plugins/create/templates/aws-nodejs-typescript/src/functions/hello/handler.ts @@ -1,5 +1,3 @@ -import 'source-map-support/register'; - import type { ValidatedEventAPIGatewayProxyEvent } from '@libs/apiGateway'; import { formatJSONResponse } from '@libs/apiGateway'; import { middyfy } from '@libs/lambda';