Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 256da4e

Browse files
jclemjoshmgross
andauthored
Update src/wrap-require.ts
Co-authored-by: Josh Gross <[email protected]>
1 parent 5ee517d commit 256da4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wrap-require.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as path from 'path'
33
export const wrapRequire = new Proxy(__non_webpack_require__, {
44
apply: (target, thisArg, [moduleID]) => {
55
if (moduleID.startsWith('.')) {
6-
moduleID = path.join(process.cwd(), moduleID)
6+
moduleID = path.resolve(moduleID)
77
return target.apply(thisArg, [moduleID])
88
}
99

0 commit comments

Comments
 (0)