Skip to content

Commit 289670d

Browse files
NemikolhAriPerkkio
andauthored
Update packages/astro/src/webcontainer-files/filesmap.ts
Co-authored-by: Ari Perkkiö <[email protected]>
1 parent 5bc4f5d commit 289670d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/astro/src/webcontainer-files/filesmap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ async function getAllFiles(dir: string, result: FilePaths): Promise<void> {
209209
function webcontainerPath(dir: string, filePath: string) {
210210
const result = `/${path.relative(dir, filePath)}`;
211211

212-
// mostly for Windows
212+
// normalize path separators
213213
if (path.sep !== '/') {
214-
return result.replaceAll('\\', '/');
214+
return result.replaceAll(path.sep, '/');
215215
}
216216

217217
return result;

0 commit comments

Comments
 (0)