mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-18 19:31:35 +02:00
Merge pull request #14876 from twbs/fix-14875
bs-commonjs-generator.js: always use forward slashes in the require path.
This commit is contained in:
@@ -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 + '\')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user