build(contracts): fix output paths for windows (@NadAlaba) (#5700)

This commit is contained in:
Nad Alaba 2024-08-01 14:32:16 +03:00 committed by GitHub
parent 482de29460
commit feaff239f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ const entryPoints = getAllFiles("./src");
// Function to generate output file names
const getOutfile = (entryPoint, format) => {
const relativePath = entryPoint.replace("src/", "");
const relativePath = entryPoint.replace(/src[/\\]/, "");
const fileBaseName = relativePath.replace(".ts", "");
return `./dist/${fileBaseName}.${format === "esm" ? "mjs" : "cjs"}`;
};