Skip to content

Commit 0803908

Browse files
committed
Replace backslash with slash in path
For Windows compatibility. See https://github.com/substack/node-browserify/blob/9.0.3/index.js#L719
1 parent 977dc08 commit 0803908

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ module.exports = function (opts) {
3333
var entries = [];
3434
var basedir = defined(opts.basedir, process.cwd());
3535
var prelude = opts.prelude || defaultPrelude;
36-
var preludePath = opts.preludePath || path.relative(basedir, defaultPreludePath);
36+
var preludePath = opts.preludePath ||
37+
path.relative(basedir, defaultPreludePath).replace(/\\/g, '/');
3738

3839
var lineno = 1 + newlinesIn(prelude);
3940
var sourcemap;

0 commit comments

Comments
 (0)