From b46412036bddc8353eec25aeace0e2088ad15a21 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Thu, 30 Mar 2023 19:16:38 +0800 Subject: [PATCH] build: fix svelte dts emit --- scripts/build.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/build.mjs b/scripts/build.mjs index 111622e..de631bb 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -26,6 +26,11 @@ import { build } from 'vite' svelteShimsPath: 'node_modules/svelte2tsx/svelte-shims.d.ts', declarationDir: './dist', }) + glob.sync('./dist/src/*.svelte.d.ts').forEach((file) => { + // console.log(file) + fs.moveSync(file, file.replace('/src', '')) + }) + fs.removeSync('./dist/src') } // build js