File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,15 @@ function Deps (opts) {
36
36
this . entries = [ ] ;
37
37
this . _input = [ ] ;
38
38
39
- this . paths = opts . paths || process . env . NODE_PATH ;
39
+ this . paths = opts . paths || process . env . NODE_PATH || '' ;
40
40
if ( typeof this . paths === 'string' ) {
41
- this . paths = process . env . NODE_PATH . split ( ':' ) ;
41
+ this . paths = this . paths . split ( path . delimiter ) ;
42
42
}
43
- if ( ! this . paths ) this . paths = [ ] ;
44
- this . paths = this . paths . map ( function ( p ) {
45
- return path . resolve ( self . basedir , p ) ;
46
- } ) ;
43
+ this . paths = this . paths
44
+ . filter ( Boolean )
45
+ . map ( function ( p ) {
46
+ return path . resolve ( self . basedir , p ) ;
47
+ } ) ;
47
48
48
49
this . transforms = [ ] . concat ( opts . transform ) . filter ( Boolean ) ;
49
50
this . globalTransforms = [ ] . concat ( opts . globalTransform ) . filter ( Boolean ) ;
You can’t perform that action at this time.
0 commit comments