Skip to content
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.

Commit

Permalink
Windows Node paths fix
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed May 11, 2015
1 parent dba399b commit b9efd57
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ if (typeof Promise === 'undefined')

var System = require('./dist/es6-module-loader-dev.src');

var filePrefix = 'file:' + (process.platform.match(/^win/) ? '/' : '') + '//';

try {
System.paths.traceur = 'file:' + require.resolve('traceur/bin/traceur.js');
System.paths.traceur = filePrefix + require.resolve('traceur/bin/traceur.js');
}
catch(e) {}
try {
System.paths.babel = 'file:' + require.resolve('babel-core/browser.js');
System.paths.babel = filePrefix + require.resolve('babel-core/browser.js');
}
catch(e) {}
try {
System.paths.babel = System.paths.babel || 'file:' + require.resolve('babel/browser.js');
System.paths.babel = System.paths.babel || filePrefix + require.resolve('babel/browser.js');
}
catch(e) {}

Expand Down

0 comments on commit b9efd57

Please sign in to comment.