Skip to content

Commit

Permalink
build(esbuild): replace slash (or backslash) with path.sep
Browse files Browse the repository at this point in the history
  • Loading branch information
wd-David committed Jun 11, 2022
1 parent d65e7e8 commit b7b2d08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ const pinoPlugin = (options) => ({
outbase = nextOutbase
i++
nextOutbase = hierarchy.slice(0, i).join(sep)
} while (entrypoints.every((e) => e.startsWith(`${nextOutbase}\\`)))
} while (entrypoints.every((e) => e.startsWith(`${nextOutbase}${sep}`)))
}
const newEntrypoints = {}
for (const entrypoint of entrypoints) {
const destination = (
outbase ? entrypoint.replace(`${outbase}\\`, '') : entrypoint
outbase ? entrypoint.replace(`${outbase}${sep}`, '') : entrypoint
).replace(/.(js|ts)$/, '')
newEntrypoints[destination] = entrypoint
}
Expand Down

0 comments on commit b7b2d08

Please sign in to comment.