bs-commonjs-generator.js: always use forward slashes in the require path.

Since `path.resolve` is using backslashes on Windows, we ended up with different files. Just replace those with forward slashes.
This commit is contained in:
XhmikosR 2014-10-26 09:35:14 +02:00
parent bab3679d10
commit 37facee922
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath)
var destDir = path.dirname(destFilepath);
function srcPathToDestRequire(srcFilepath) {
var requirePath = path.relative(destDir, srcFilepath);
var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/');
return 'require(\'' + requirePath + '\')';
}