From 323b74414437eed3e826d2dd514af92b10fa8cc5 Mon Sep 17 00:00:00 2001 From: khouwdevin Date: Sun, 9 Aug 2026 01:52:08 +0700 Subject: [PATCH 1/2] fix(generate-palette): fix ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows --- src/generate-palette.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generate-palette.ts b/src/generate-palette.ts index c6d6ade..7c8d199 100644 --- a/src/generate-palette.ts +++ b/src/generate-palette.ts @@ -64,7 +64,7 @@ function readCustomProperties(element: Element): Record { async function extractPalette(outputPath: string) { const themePackageJson = ( - await import(path.join(process.cwd(), 'package.json'), { with: { type: 'json' } }) + await import(pathToFileURL(path.join(process.cwd(), 'package.json')), { with: { type: 'json' } }) ).default const themeVariableManifest: ThemeVariableManifest = ( await import(`@inkdropapp/css/variables.json`, { with: { type: 'json' } }) From e7de94a6e3eba402fb2b44cb2872a70b2e9050c3 Mon Sep 17 00:00:00 2001 From: khouwdevin Date: Sun, 9 Aug 2026 08:17:21 +0700 Subject: [PATCH 2/2] fix(generate-palette): use toString to fix import error --- src/generate-palette.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generate-palette.ts b/src/generate-palette.ts index 7c8d199..30583dd 100644 --- a/src/generate-palette.ts +++ b/src/generate-palette.ts @@ -64,7 +64,7 @@ function readCustomProperties(element: Element): Record { async function extractPalette(outputPath: string) { const themePackageJson = ( - await import(pathToFileURL(path.join(process.cwd(), 'package.json')), { with: { type: 'json' } }) + await import(pathToFileURL(path.join(process.cwd(), 'package.json')).toString(), { with: { type: 'json' } }) ).default const themeVariableManifest: ThemeVariableManifest = ( await import(`@inkdropapp/css/variables.json`, { with: { type: 'json' } })