Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ade5cea

Browse filesBrowse files
committed
Use concat for paths
1 parent c1c139b commit ade5cea
Copy full SHA for ade5cea

File tree

2 files changed

+6
-2
lines changed
Filter options

2 files changed

+6
-2
lines changed

‎dist/index.js

Copy file name to clipboardExpand all lines: dist/index.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2467,7 +2467,9 @@ const wrapRequire = new Proxy(require, {
24672467
return target.apply(thisArg, [moduleID]);
24682468
}
24692469
catch (err) {
2470-
return target.resolve(moduleID, { paths: [...module.paths, process.cwd()] });
2470+
return target.resolve(moduleID, {
2471+
paths: module.paths.concat(process.cwd())
2472+
});
24712473
}
24722474
},
24732475
get: (target, prop, receiver) => {

‎src/wrap-require.ts

Copy file name to clipboardExpand all lines: src/wrap-require.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ export const wrapRequire = new Proxy(__non_webpack_require__, {
1010
try {
1111
return target.apply(thisArg, [moduleID])
1212
} catch (err) {
13-
return target.resolve(moduleID, {paths: [...module.paths, process.cwd()]})
13+
return target.resolve(moduleID, {
14+
paths: module.paths.concat(process.cwd())
15+
})
1416
}
1517
},
1618

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.