mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 03:48:56 +00:00
Fix interopRequireDefault issue with path :(
This commit is contained in:
@@ -16,6 +16,7 @@ function bound(obj) {
|
||||
};
|
||||
}
|
||||
var path = bound(Bun._Path(false));
|
||||
path[Symbol.for("CommonJS")] = 0;
|
||||
|
||||
export var {
|
||||
basename,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function bound(obj) {
|
||||
return {
|
||||
var result = {
|
||||
basename: obj.basename.bind(obj),
|
||||
dirname: obj.dirname.bind(obj),
|
||||
extname: obj.extname.bind(obj),
|
||||
@@ -14,13 +14,17 @@ function bound(obj) {
|
||||
sep: obj.sep,
|
||||
delimiter: obj.delimiter,
|
||||
};
|
||||
result.default = result;
|
||||
return result;
|
||||
}
|
||||
var path = bound(Bun._Path());
|
||||
path.win32 = win32;
|
||||
path.posix = posix;
|
||||
|
||||
export var posix = bound(Bun._Path(false));
|
||||
export var win32 = bound(Bun._Path(true));
|
||||
|
||||
path.win32 = win32;
|
||||
path.posix = posix;
|
||||
|
||||
export var {
|
||||
basename,
|
||||
dirname,
|
||||
@@ -35,6 +39,9 @@ export var {
|
||||
toNamespacedPath,
|
||||
sep,
|
||||
delimiter,
|
||||
__esModule,
|
||||
} = path;
|
||||
|
||||
path[Symbol.for("CommonJS")] = 0;
|
||||
path.__esModule = true;
|
||||
export default path;
|
||||
|
||||
Reference in New Issue
Block a user