File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 11const resolve = require ( 'resolve' ) ;
22const path = require ( 'path' ) ;
33
4- module . exports . interfaceVersion = 2 ;
5-
64function opts ( file , config ) {
75 return Object . assign (
86 { extensions : [ '.ts' , '.tsx' ] } ,
97 config ,
108 // path.resolve will handle paths relative to CWD
11- { basedir : path . dirname ( path . resolve ( file ) ) } ,
9+ { basedir : path . dirname ( path . resolve ( file ) ) }
1210 ) ;
1311}
1412
15- module . exports . resolve = function ( source , file , config ) {
16- if ( resolve . isCore ( source ) ) {
17- return { found : true , path : null } ;
18- }
13+ module . exports = {
14+ interfaceVersion : 2 ,
15+ resolve : function ( source , file , config ) {
16+ if ( resolve . isCore ( source ) ) {
17+ return { found : true , path : null } ;
18+ }
1919
20- try {
21- return { found : true , path : resolve . sync ( source , opts ( file , config ) ) } ;
22- } catch ( err ) {
23- return { found : false } ;
24- }
20+ try {
21+ return { found : true , path : resolve . sync ( source , opts ( file , config ) ) } ;
22+ } catch ( err ) {
23+ return { found : false } ;
24+ }
25+ } ,
2526} ;
You can’t perform that action at this time.
0 commit comments