Skip to content
This repository has been archived by the owner on May 1, 2022. It is now read-only.

fix(windows): normalize incoming paths to getDestPath #57

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ async function copyFile(srcPath: string): Promise<void> {
}

function getDestPath(srcPath: string): string {
return srcPath.replace(new RegExp(`^src\\${path.sep}`), `dist${path.sep}`);
return path
.normalize(srcPath)
.replace(new RegExp(`^src\\${path.sep}`), `dist${path.sep}`);
}

// Update the import paths to correctly point to web_modules.
Expand Down