Skip to content

Commit

Permalink
refac: skip loop if no filename
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Nov 18, 2023
1 parent fe0e2b2 commit e17f328
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/build-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,10 @@ async function buildConfig(

if (dts) {
const dtsExt = dtsExtentions[ext]
const filename = filenameWithoutExtension(binDistPath) ?? ''
const binTypeFile = `${filename}${dtsExt}`
const filename = filenameWithoutExtension(binDistPath)
if (!filename) continue

const binTypeFile = `${filename}${dtsExt}`
outputExports.push(binTypeFile)
} else {
// ESM by default, CJS if the file extension is .cjs
Expand Down

0 comments on commit e17f328

Please sign in to comment.