fix: use correct handler for esbuild enabled check (#12543)

This commit is contained in:
Max Marze 2024-05-25 14:29:54 -04:00 committed by GitHub
parent 347713f3a8
commit d9bedf28af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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']) {