Skip to content

Commit 12e6269

Browse files
committed
fix(build): resolve tsdown vendor alias with fileURLToPath
Signed-off-by: Huangshuo Kuang <[email protected]>
1 parent 542fb77 commit 12e6269

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎tsdown.config.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import fs from 'node:fs';
2+
import { fileURLToPath } from 'node:url';
23
import { defineConfig, type TsdownPluginOption } from 'tsdown';
34

45
const typeScriptPackageJsonUrl = import.meta.resolve('typescript/package.json');
@@ -169,8 +170,9 @@ export default defineConfig({
169170
// specifier to a chunk that names the omission. Add the package to `deps.onlyBundle` and drop
170171
// this alias to restore that path.
171172
alias: {
172-
'@limrun/xdelta3-wasm': new URL('./src/vendor/limrun-delta-sync-omitted.ts', import.meta.url)
173-
.pathname,
173+
'@limrun/xdelta3-wasm': fileURLToPath(
174+
new URL('./src/vendor/limrun-delta-sync-omitted.ts', import.meta.url),
175+
),
174176
},
175177
format: 'esm',
176178
platform: 'node',

0 commit comments

Comments
 (0)