From 4441945d051fa558db2270926583fd0443043c25 Mon Sep 17 00:00:00 2001 From: Joren Broekema Date: Thu, 18 Jun 2020 20:59:58 +0200 Subject: [PATCH] fix(babel-plugin-extend-docs): use posix path join for posix type path --- packages/babel-plugin-extend-docs/src/helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/babel-plugin-extend-docs/src/helpers.js b/packages/babel-plugin-extend-docs/src/helpers.js index 95fd4ed55..0ef6ddb6e 100644 --- a/packages/babel-plugin-extend-docs/src/helpers.js +++ b/packages/babel-plugin-extend-docs/src/helpers.js @@ -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}`;