Skip to content

Commit

Permalink
refactor: remove useless if check (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinchang authored Nov 15, 2023
1 parent 29918ee commit 6984d86
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down

0 comments on commit 6984d86

Please sign in to comment.