File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
var DepGraph = require ( 'dependency-graph' ) . DepGraph ;
4
4
var nodeResolve = require ( 'resolve' ) ;
5
+ var pathIsAbsolute = require ( 'path-is-absolute' )
5
6
6
7
Object . defineProperty ( exports , '__esModule' , {
7
8
value : true
@@ -68,7 +69,7 @@ var FileSystemLoader = (function () {
68
69
fileRelativePath = _path2 [ 'default' ] . resolve ( rootRelativeDir , newPath ) ;
69
70
70
71
// if the path is not relative or absolute, try to resolve it in node_modules
71
- if ( newPath [ 0 ] !== '.' && newPath [ 0 ] !== '/' ) {
72
+ if ( newPath [ 0 ] !== '.' && ! pathIsAbsolute ( newPath ) ) {
72
73
var paths ;
73
74
if ( process . env . NODE_PATH ) {
74
75
paths = process . env . NODE_PATH . split ( _path2 [ 'default' ] . delimiter ) ;
Original file line number Diff line number Diff line change 7
7
"css-modules-loader-core" : " ^1.1.0" ,
8
8
"dependency-graph" : " ^0.4.1" ,
9
9
"object-assign" : " ^3.0.0" ,
10
+ "path-is-absolute" : " ^1.0.1" ,
10
11
"promise-polyfill" : " ^2.1.0" ,
11
12
"resolve" : " ^1.1.7" ,
12
13
"string-hash" : " ^1.1.0" ,
You can’t perform that action at this time.
0 commit comments