From: XhmikosR Date: Sun, 26 Oct 2014 07:35:14 +0000 (+0200) Subject: bs-commonjs-generator.js: always use forward slashes in the require path. X-Git-Tag: v3.3.0~22^2~2^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37facee9224013d3b162c391562db458ef41924e;p=thirdparty%2Fbootstrap.git 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. --- diff --git a/grunt/bs-commonjs-generator.js b/grunt/bs-commonjs-generator.js index 18542cc74f..e28900fb5e 100644 --- a/grunt/bs-commonjs-generator.js +++ b/grunt/bs-commonjs-generator.js @@ -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 + '\')'; }