Skip to content

Commit a536654

Browse files
committed
fix(path): export win32
1 parent 147495c commit a536654

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/compiler/sys/modules/path.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export let resolve: any;
1515
export let sep: any;
1616
export let delimiter: any;
1717
export let posix: any;
18+
export let win32: any;
1819

1920
export const path: d.PlatformPath = {} as any;
2021

@@ -43,6 +44,12 @@ export const setPlatformPath = (platformPath: d.PlatformPath) => {
4344
sep = path.sep;
4445
delimiter = path.delimiter;
4546
posix = path.posix;
47+
if (path.win32) {
48+
win32 = path.win32;
49+
} else {
50+
win32 = { ...posix };
51+
win32.sep = '\\';
52+
}
4653
};
4754

4855
setPlatformPath(IS_NODE_ENV ? requireFunc('path') : pathBrowserify);

0 commit comments

Comments
 (0)