Skip to content

Commit 37facee

Browse files
committed
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.
1 parent bab3679 commit 37facee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grunt/bs-commonjs-generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath)
88
var destDir = path.dirname(destFilepath);
99

1010
function srcPathToDestRequire(srcFilepath) {
11-
var requirePath = path.relative(destDir, srcFilepath);
11+
var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/');
1212
return 'require(\'' + requirePath + '\')';
1313
}
1414

0 commit comments

Comments
 (0)