From 5add85d61400e99d15fa454fa2caf94f630dbd47 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Thu, 20 Oct 2022 10:33:38 +0800 Subject: [PATCH] fix win --- scripts/rollup-plugin-standalone-internals.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/rollup-plugin-standalone-internals.js b/scripts/rollup-plugin-standalone-internals.js index 23eecc2d2220..4b8e879faa0e 100644 --- a/scripts/rollup-plugin-standalone-internals.js +++ b/scripts/rollup-plugin-standalone-internals.js @@ -1,8 +1,9 @@ import fs from "fs"; +import { fileURLToPath } from "url"; const standaloneURL = new URL("../packages/babel-standalone/", import.meta.url); -const inStandalone = path => new URL(path, standaloneURL).pathname; - +const inStandalone = path => + fileURLToPath(new URL(path, standaloneURL)).replace(/\\/g, "/"); const { noopPlugins, unexposedNoopPlugins } = JSON.parse( fs.readFileSync(new URL("./scripts/pluginConfig.json", standaloneURL), "utf8") );