Remove require search fallback

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

No files matched your search

+1 -2
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()]
}
])