From 12e62697926f42688a4f5531ec1d9e0840c240f6 Mon Sep 17 00:00:00 2001 From: Huangshuo Kuang <141250392+kkkhs@users.noreply.github.com> Date: Thu, 15 Oct 2026 03:24:15 +0000 Subject: [PATCH] fix(build): resolve tsdown vendor alias with fileURLToPath Signed-off-by: Huangshuo Kuang <141250392+kkkhs@users.noreply.github.com> --- tsdown.config.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tsdown.config.ts b/tsdown.config.ts index 163bb4c75d..2fb6911644 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -1,4 +1,5 @@ import fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { defineConfig, type TsdownPluginOption } from 'tsdown'; const typeScriptPackageJsonUrl = import.meta.resolve('typescript/package.json'); @@ -169,8 +170,9 @@ export default defineConfig({ // specifier to a chunk that names the omission. Add the package to `deps.onlyBundle` and drop // this alias to restore that path. alias: { - '@limrun/xdelta3-wasm': new URL('./src/vendor/limrun-delta-sync-omitted.ts', import.meta.url) - .pathname, + '@limrun/xdelta3-wasm': fileURLToPath( + new URL('./src/vendor/limrun-delta-sync-omitted.ts', import.meta.url), + ), }, format: 'esm', platform: 'node',