Update src/wrap-require.ts

Co-authored-by: Josh Gross <[email protected]>
This commit is contained in:
Jonathan ClemandJosh Gross authored and GitHub committed 2021-04-21 17:46:09 -04:00
1 parent 5ee517dae8
commit 256da4ea4d
1 file changed
+1 -1
+1 -1
View File
@@ -3,7 +3,7 @@ import * as path from 'path'
export const wrapRequire = new Proxy(__non_webpack_require__, { export const wrapRequire = new Proxy(__non_webpack_require__, {
apply: (target, thisArg, [moduleID]) => { apply: (target, thisArg, [moduleID]) => {
if (moduleID.startsWith('.')) { if (moduleID.startsWith('.')) {
moduleID = path.join(process.cwd(), moduleID) moduleID = path.resolve(moduleID)
return target.apply(thisArg, [moduleID]) return target.apply(thisArg, [moduleID])
} }