fix(babel-plugin-extend-docs): use posix path join for posix type path

This commit is contained in:
Joren Broekema 2020-06-18 20:59:58 +02:00 committed by Thomas Allmer
parent 8958b2fa02
commit 4441945d05

View file

@ -5,8 +5,8 @@ function joinPaths(a, b) {
if (a && a === b.substring(0, a.length)) {
joinMe = b.substring(a.length + 1);
}
const updatedPath = path.join(a, joinMe);
// console.log({ a, b, updatedPath });
// Normalize for windows
const updatedPath = path.posix.join(a, joinMe);
if (a === '' && b.startsWith('./')) {
return `./${updatedPath}`;