From 8ec8a50e232f942a34d2d74639afbb09c693e853 Mon Sep 17 00:00:00 2001 From: Joe Hoyle Date: Tue, 5 Mar 2024 15:59:49 +0200 Subject: [PATCH] Import with file extensions Setting the tsconfig properly makes TSC also throw an error / warning for the extensionless imports too. --- src/lambda-handler.ts | 2 +- tsconfig.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lambda-handler.ts b/src/lambda-handler.ts index 6a5e243..b0053d1 100644 --- a/src/lambda-handler.ts +++ b/src/lambda-handler.ts @@ -1,4 +1,4 @@ -import { Args, getS3File, resizeBuffer, Config } from './lib'; +import { Args, getS3File, resizeBuffer, Config } from './lib.js'; /** * * @param event diff --git a/tsconfig.json b/tsconfig.json index 5527e68..52de306 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,8 +4,8 @@ "strict": true, "preserveConstEnums": true, "sourceMap": false, - "module": "ES2022", - "moduleResolution": "node", + "module": "Node16", + "moduleResolution": "node16", "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true,