build: fix svelte dts emit

This commit is contained in:
Rongjian Zhang 2023-03-30 19:16:38 +08:00
parent 467f16c5d4
commit b46412036b
1 changed files with 5 additions and 0 deletions

View File

@ -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