From dba774e1c76683f45f5b57a5df95062ee24b615f Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Sun, 15 Mar 2026 19:41:00 +0800 Subject: [PATCH] chore(vsh): migrate build to tsdown --- scripts/vsh/build.config.ts | 7 ------- scripts/vsh/package.json | 3 ++- scripts/vsh/tsdown.config.ts | 11 +++++++++++ 3 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 scripts/vsh/build.config.ts create mode 100644 scripts/vsh/tsdown.config.ts diff --git a/scripts/vsh/build.config.ts b/scripts/vsh/build.config.ts deleted file mode 100644 index 97e572c56..000000000 --- a/scripts/vsh/build.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineBuildConfig } from 'unbuild'; - -export default defineBuildConfig({ - clean: true, - declaration: true, - entries: ['src/index'], -}); diff --git a/scripts/vsh/package.json b/scripts/vsh/package.json index 441dbb756..8bea4f025 100644 --- a/scripts/vsh/package.json +++ b/scripts/vsh/package.json @@ -5,7 +5,8 @@ "license": "MIT", "type": "module", "scripts": { - "stub": "pnpm unbuild --stub" + "build": "pnpm exec tsdown", + "stub": "pnpm exec tsdown" }, "files": [ "dist" diff --git a/scripts/vsh/tsdown.config.ts b/scripts/vsh/tsdown.config.ts new file mode 100644 index 000000000..c4f51c5ee --- /dev/null +++ b/scripts/vsh/tsdown.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'tsdown'; + +export default defineConfig({ + clean: true, + dts: true, + entry: ['src/index.ts'], + format: ['esm'], + outExtensions: () => ({ + dts: '.d.ts', + }), +});