Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion file-system-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

var DepGraph = require('dependency-graph').DepGraph;
var nodeResolve = require('resolve');
var pathIsAbsolute = require('path-is-absolute')

Object.defineProperty(exports, '__esModule', {
value: true
Expand Down Expand Up @@ -68,7 +69,7 @@ var FileSystemLoader = (function () {
fileRelativePath = _path2['default'].resolve(rootRelativeDir, newPath);

// if the path is not relative or absolute, try to resolve it in node_modules
if (newPath[0] !== '.' && newPath[0] !== '/') {
if (newPath[0] !== '.' && !pathIsAbsolute(newPath)) {
var paths;
if (process.env.NODE_PATH) {
paths = process.env.NODE_PATH.split(_path2['default'].delimiter);
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"css-modules-loader-core": "^1.1.0",
"dependency-graph": "^0.4.1",
"object-assign": "^3.0.0",
"path-is-absolute": "^1.0.1",
"promise-polyfill": "^2.1.0",
"resolve": "^1.1.7",
"string-hash": "^1.1.0",
Expand Down