From 0994f6dcf74ab1b1778915ead5ed73939cadaade Mon Sep 17 00:00:00 2001 From: remorses Date: Mon, 27 Jan 2025 10:38:51 +0100 Subject: [PATCH] fix windows import for real this time, fix #24 --- unframer/src/exporter.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unframer/src/exporter.ts b/unframer/src/exporter.ts index 2fab562..cc828e3 100644 --- a/unframer/src/exporter.ts +++ b/unframer/src/exporter.ts @@ -915,9 +915,9 @@ export async function extractPropControlsUnsafe( let propCode = `JSON.stringify({propertyControls: x.default?.propertyControls, fonts: x?.default?.fonts } || {}, null, 2)` const fileUrl = url.pathToFileURL(filename).href - const code = `import("${url.fileURLToPath( - fileUrl, - )}").then(x => { console.log("${delimiter}"); console.log(${propCode}) })` + const code = `import("${url + .pathToFileURL(fileUrl) + .toString()}").then(x => { console.log("${delimiter}"); console.log(${propCode}) })` const TIMEOUT = 5 * 1000 const UNFRAMER_MAP_PACKAGES = JSON.stringify({