From 60e68705cc2011098f0246bfd042df0f1a941d9e Mon Sep 17 00:00:00 2001 From: weidehai <243395655@qq.com> Date: Sat, 17 Sep 2022 16:09:49 +0800 Subject: [PATCH] chore(build): make writefile path compatible posix and windows system (#13270) Co-authored-by: Gareth Jones --- scripts/bundleTs.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/bundleTs.mjs b/scripts/bundleTs.mjs index 73e0c058292b..f4a7805cd467 100644 --- a/scripts/bundleTs.mjs +++ b/scripts/bundleTs.mjs @@ -201,7 +201,10 @@ const excludedPackages = new Set(['@jest/globals']); }); await fs.promises.writeFile( - filepath.replace('/dist/', '/build/'), + filepath.replace( + `${path.sep}dist${path.sep}`, + `${path.sep}build${path.sep}`, + ), formattedContent, ); }),