From 256da4ea4d14f7090616071be552b0b2c1df5bf8 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Wed, 21 Apr 2021 17:46:09 -0400 Subject: [PATCH] Update src/wrap-require.ts Co-authored-by: Josh Gross --- src/wrap-require.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrap-require.ts b/src/wrap-require.ts index 22311d9..d7e45ef 100644 --- a/src/wrap-require.ts +++ b/src/wrap-require.ts @@ -3,7 +3,7 @@ import * as path from 'path' export const wrapRequire = new Proxy(__non_webpack_require__, { apply: (target, thisArg, [moduleID]) => { if (moduleID.startsWith('.')) { - moduleID = path.join(process.cwd(), moduleID) + moduleID = path.resolve(moduleID) return target.apply(thisArg, [moduleID]) }