Remove require search fallback

This commit is contained in:
Jonathan Clem
2021-04-21 18:13:51 -04:00
parent a49bf6b2cd
commit 1ef7fd09ca
2 changed files with 129 additions and 140 deletions

View File

@@ -10,10 +10,9 @@ export const wrapRequire = new Proxy(__non_webpack_require__, {
const modulePath = target.resolve.apply(thisArg, [
moduleID,
{
// Search the current working directory first, then the existing paths.
// Webpack does not have an escape hatch for getting the actual
// module, other than `eval`.
paths: [process.cwd(), ...eval('module').paths]
paths: [process.cwd()]
}
])