diff --git a/dist/index.js b/dist/index.js index 159c7c5..19a3102 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2906,6 +2906,8 @@ const wrapRequire = new Proxy(require, { const modulePath = target.resolve.apply(thisArg, [ moduleID, { + // Webpack does not have an escape hatch for getting the actual + // module, other than `eval`. paths: eval('module').paths.concat(process.cwd()) } ]); diff --git a/src/wrap-require.ts b/src/wrap-require.ts index de15f6e..22311d9 100644 --- a/src/wrap-require.ts +++ b/src/wrap-require.ts @@ -13,6 +13,8 @@ export const wrapRequire = new Proxy(__non_webpack_require__, { const modulePath = target.resolve.apply(thisArg, [ moduleID, { + // Webpack does not have an escape hatch for getting the actual + // module, other than `eval`. paths: eval('module').paths.concat(process.cwd()) } ])