From 8abf08846cb2cf3bacdbedc4ce429d96b840e822 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Thu, 20 Oct 2022 09:43:14 +0800 Subject: [PATCH] fix win --- scripts/rollup-plugin-standalone-internals.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/rollup-plugin-standalone-internals.js b/scripts/rollup-plugin-standalone-internals.js index 23eecc2d2220..115fb0536e46 100644 --- a/scripts/rollup-plugin-standalone-internals.js +++ b/scripts/rollup-plugin-standalone-internals.js @@ -1,8 +1,8 @@ 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)); const { noopPlugins, unexposedNoopPlugins } = JSON.parse( fs.readFileSync(new URL("./scripts/pluginConfig.json", standaloneURL), "utf8") );