From 282dc4c4b68c966e50e67b9027c90eb89b424703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Wed, 19 Oct 2022 22:11:47 +0200 Subject: [PATCH] Try fixing windows --- scripts/rollup-plugin-standalone-internals.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/rollup-plugin-standalone-internals.js b/scripts/rollup-plugin-standalone-internals.js index 23eecc2d2220..7a6d0048c12a 100644 --- a/scripts/rollup-plugin-standalone-internals.js +++ b/scripts/rollup-plugin-standalone-internals.js @@ -1,7 +1,10 @@ import fs from "fs"; -const standaloneURL = new URL("../packages/babel-standalone/", import.meta.url); -const inStandalone = path => new URL(path, standaloneURL).pathname; +const standaloneURL = new URL("../packages/babel-standalone/", import.meta.url) + .replace(/\\/g, "/") + // Remove /C:/ + .replace(/^\/[A-Z]:\//, "/"); +const inStandalone = path => new URL(path, standaloneURL).href; const { noopPlugins, unexposedNoopPlugins } = JSON.parse( fs.readFileSync(new URL("./scripts/pluginConfig.json", standaloneURL), "utf8")