File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Original file line number Diff line number Diff line change @@ -2903,9 +2903,13 @@ const wrapRequire = new Proxy(require, {
2903
2903
return target . apply ( thisArg , [ moduleID ] ) ;
2904
2904
}
2905
2905
catch ( err ) {
2906
- return target . resolve ( moduleID , {
2907
- paths : eval ( 'module' ) . paths . concat ( process . cwd ( ) )
2908
- } ) ;
2906
+ const modulePath = target . resolve . apply ( thisArg , [
2907
+ moduleID ,
2908
+ {
2909
+ paths : eval ( 'module' ) . paths . concat ( process . cwd ( ) )
2910
+ }
2911
+ ] ) ;
2912
+ return target . apply ( thisArg , [ modulePath ] ) ;
2909
2913
}
2910
2914
} ,
2911
2915
get : ( target , prop , receiver ) => {
Original file line number Diff line number Diff line change @@ -10,9 +10,14 @@ export const wrapRequire = new Proxy(__non_webpack_require__, {
10
10
try {
11
11
return target . apply ( thisArg , [ moduleID ] )
12
12
} catch ( err ) {
13
- return target . resolve ( moduleID , {
14
- paths : eval ( 'module' ) . paths . concat ( process . cwd ( ) )
15
- } )
13
+ const modulePath = target . resolve . apply ( thisArg , [
14
+ moduleID ,
15
+ {
16
+ paths : eval ( 'module' ) . paths . concat ( process . cwd ( ) )
17
+ }
18
+ ] )
19
+
20
+ return target . apply ( thisArg , [ modulePath ] )
16
21
}
17
22
} ,
18
23
You can’t perform that action at this time.
0 commit comments