From 0b53a879f3a3197dc51410bcfc7e06aa1e2a703a Mon Sep 17 00:00:00 2001 From: sinchang Date: Wed, 15 Nov 2023 15:19:14 +0800 Subject: [PATCH] refactor: remove useless if check --- src/exports.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/exports.ts b/src/exports.ts index 4a216060..5c18594c 100644 --- a/src/exports.ts +++ b/src/exports.ts @@ -301,9 +301,7 @@ export function getExportConditionDist( const distFile = getDistPath(relativePath, cwd) let format: 'cjs' | 'esm' = 'esm' - if (isEsmExportName(key, ext)) { - format = 'esm' - } else if (isCjsExportName(key, ext)) { + if (isCjsExportName(key, ext)) { format = 'cjs' }