Skip to content

Commit

Permalink
fix(path): export win32
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdbradley committed Nov 6, 2020
1 parent 147495c commit a536654
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/compiler/sys/modules/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export let resolve: any;
export let sep: any;
export let delimiter: any;
export let posix: any;
export let win32: any;

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

Expand Down Expand Up @@ -43,6 +44,12 @@ export const setPlatformPath = (platformPath: d.PlatformPath) => {
sep = path.sep;
delimiter = path.delimiter;
posix = path.posix;
if (path.win32) {
win32 = path.win32;
} else {
win32 = { ...posix };
win32.sep = '\\';
}
};

setPlatformPath(IS_NODE_ENV ? requireFunc('path') : pathBrowserify);
Expand Down

0 comments on commit a536654

Please sign in to comment.