Commit 37facee9 authored by XhmikosR's avatar XhmikosR

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.
parent bab3679d
...@@ -8,7 +8,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) ...@@ -8,7 +8,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath)
var destDir = path.dirname(destFilepath); var destDir = path.dirname(destFilepath);
function srcPathToDestRequire(srcFilepath) { function srcPathToDestRequire(srcFilepath) {
var requirePath = path.relative(destDir, srcFilepath); var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/');
return 'require(\'' + requirePath + '\')'; return 'require(\'' + requirePath + '\')';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment