Skip to content

Commit bcc93c2

Browse files
committed
fix(build): normalize Windows paths in export validation
Normalize path separators to forward slashes before checking if path starts with 'external/' to fix Windows build failures.
1 parent 9d6fbee commit bcc93c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/validate-dist-exports.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ function checkExport(filePath) {
4343
// Skip external packages - they are internal implementation details
4444
// used by public dist/* modules. We only validate public exports.
4545
const relativePath = path.relative(distDir, filePath)
46-
if (relativePath.startsWith('external/')) {
46+
// Normalize path for cross-platform compatibility (Windows uses backslashes)
47+
const normalizedPath = relativePath.split(path.sep).join('/')
48+
if (normalizedPath.startsWith('external/')) {
4749
return { path: filePath, ok: true, skipped: true }
4850
}
4951

0 commit comments

Comments
 (0)