Skip to content

Commit

Permalink
Fix convertPathForServer for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
KoltesDigital committed May 4, 2019
1 parent e9da2ac commit fc652f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export function convertPathForServer(
}

// Get relative path from projectPath
const relativePath = path.relative(projectPath, target);
let relativePath = path.relative(projectPath, target);

if (path.sep === '\\') {
relativePath = relativePath.replace(/\\/g, '/');
}

return `http://localhost:${port}/link/${relativePath}`;
}

0 comments on commit fc652f4

Please sign in to comment.