Skip to content

Commit b7b2d08

Browse files
committed
build(esbuild): replace slash (or backslash) with path.sep
1 parent d65e7e8 commit b7b2d08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

esbuild.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ const pinoPlugin = (options) => ({
4141
outbase = nextOutbase
4242
i++
4343
nextOutbase = hierarchy.slice(0, i).join(sep)
44-
} while (entrypoints.every((e) => e.startsWith(`${nextOutbase}\\`)))
44+
} while (entrypoints.every((e) => e.startsWith(`${nextOutbase}${sep}`)))
4545
}
4646
const newEntrypoints = {}
4747
for (const entrypoint of entrypoints) {
4848
const destination = (
49-
outbase ? entrypoint.replace(`${outbase}\\`, '') : entrypoint
49+
outbase ? entrypoint.replace(`${outbase}${sep}`, '') : entrypoint
5050
).replace(/.(js|ts)$/, '')
5151
newEntrypoints[destination] = entrypoint
5252
}

0 commit comments

Comments
 (0)