From d9bedf28aff013e2f98eb776bca0c0975ecd200f Mon Sep 17 00:00:00 2001 From: Max Marze Date: Sat, 25 May 2024 14:29:54 -0400 Subject: [PATCH] fix: use correct handler for esbuild enabled check (#12543) --- lib/plugins/esbuild/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/esbuild/index.js b/lib/plugins/esbuild/index.js index 9cde54556..9706287e5 100644 --- a/lib/plugins/esbuild/index.js +++ b/lib/plugins/esbuild/index.js @@ -142,7 +142,7 @@ class Esbuild { return true } - const functionName = path.extname(functionHandler).slice(1); + const functionName = path.extname(functionObject[handlerPropertyName]).slice(1); const handlerPath = functionHandler.replace(`.${functionName}`, ''); let parsedExtension = undefined; for (const extension of ['.js', '.ts', '.cjs', '.mjs', '.cts', '.mts', '.jsx', '.tsx']) {