Use concat for paths

This commit is contained in:
Jonathan Clem 2021-04-21 17:02:53 -04:00
parent c1c139b0ab
commit ade5cea985
No known key found for this signature in database
GPG key ID: 2159A758355F0178
2 changed files with 6 additions and 2 deletions

View file

@ -10,7 +10,9 @@ export const wrapRequire = new Proxy(__non_webpack_require__, {
try {
return target.apply(thisArg, [moduleID])
} catch (err) {
return target.resolve(moduleID, {paths: [...module.paths, process.cwd()]})
return target.resolve(moduleID, {
paths: module.paths.concat(process.cwd())
})
}
},