File tree Expand file tree Collapse file tree 3 files changed +40
-40
lines changed Expand file tree Collapse file tree 3 files changed +40
-40
lines changed Original file line number Diff line number Diff line change 1- var path = require ( 'path' )
2-
3- exports . resolveImport = function ( modulePath , sourceFile , config ) {
4- var sourceFileName = path . basename ( sourceFile )
5- if ( sourceFileName === 'foo.js' ) {
6- return path . join ( __dirname , 'bar.jsx' )
7- }
8- if ( sourceFileName === 'exception.js' ) {
9- throw new Error ( 'foo-bar-resolver-v1 resolveImport test exception' )
10- }
11- return undefined ;
12- }
1+ var path = require ( 'path' )
2+
3+ exports . resolveImport = function ( modulePath , sourceFile , config ) {
4+ var sourceFileName = path . basename ( sourceFile )
5+ if ( sourceFileName === 'foo.js' ) {
6+ return path . join ( __dirname , 'bar.jsx' )
7+ }
8+ if ( sourceFileName === 'exception.js' ) {
9+ throw new Error ( 'foo-bar-resolver-v1 resolveImport test exception' )
10+ }
11+ return undefined ;
12+ }
Original file line number Diff line number Diff line change 1- var path = require ( 'path' )
2-
3- exports . resolveImport = function ( modulePath , sourceFile , config ) {
4- var sourceFileName = path . basename ( sourceFile )
5- if ( sourceFileName === 'foo.js' ) {
6- return path . join ( __dirname , 'bar.jsx' ) ;
7- }
8- if ( sourceFileName === 'exception.js' ) {
9- throw new Error ( 'foo-bar-resolver-v1 resolveImport test exception' ) ;
10- }
11- return undefined ;
12- } ;
13-
14- exports . interfaceVersion = 1 ;
1+ var path = require ( 'path' )
2+
3+ exports . resolveImport = function ( modulePath , sourceFile , config ) {
4+ var sourceFileName = path . basename ( sourceFile )
5+ if ( sourceFileName === 'foo.js' ) {
6+ return path . join ( __dirname , 'bar.jsx' ) ;
7+ }
8+ if ( sourceFileName === 'exception.js' ) {
9+ throw new Error ( 'foo-bar-resolver-v1 resolveImport test exception' ) ;
10+ }
11+ return undefined ;
12+ } ;
13+
14+ exports . interfaceVersion = 1 ;
Original file line number Diff line number Diff line change 1- var path = require ( 'path' )
2-
3- exports . resolve = function ( modulePath , sourceFile , config ) {
4- var sourceFileName = path . basename ( sourceFile )
5- if ( sourceFileName === 'foo.js' ) {
6- return { found : true , path : path . join ( __dirname , 'bar.jsx' ) }
7- }
8- if ( sourceFileName === 'exception.js' ) {
9- throw new Error ( 'foo-bar-resolver-v2 resolve test exception' )
10- }
11- return { found : false } ;
12- } ;
13-
14- exports . interfaceVersion = 2 ;
1+ var path = require ( 'path' )
2+
3+ exports . resolve = function ( modulePath , sourceFile , config ) {
4+ var sourceFileName = path . basename ( sourceFile )
5+ if ( sourceFileName === 'foo.js' ) {
6+ return { found : true , path : path . join ( __dirname , 'bar.jsx' ) }
7+ }
8+ if ( sourceFileName === 'exception.js' ) {
9+ throw new Error ( 'foo-bar-resolver-v2 resolve test exception' )
10+ }
11+ return { found : false } ;
12+ } ;
13+
14+ exports . interfaceVersion = 2 ;
You can’t perform that action at this time.
0 commit comments