Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
windows alias support fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jan 30, 2015
1 parent 0ab5e78 commit 97cd25f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion npm.js
Expand Up @@ -569,8 +569,9 @@ NPMLocation.prototype = {
// finally we map builtins to the adjusted module
})
.then(function() {
var baseDir = path.dirname(path.relative(dir, file));
return cjsCompiler.remap(source, function(dep) {
var relPath = path.join(path.dirname(filename), dep);
var relPath = path.join(baseDir, dep.replace(/\//g, path.sep)).replace(/\\/g, '/');
var firstPart = dep.split('/').splice(0, dep.substr(0, 1) == '@' ? 2 : 1).join('/');

// first check if this is an alias
Expand Down

0 comments on commit 97cd25f

Please sign in to comment.