mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-04-19 17:16:08 +08:00
24 lines
542 B
TypeScript
24 lines
542 B
TypeScript
import { build } from 'vite';
|
|
import dts from 'vite-plugin-dts';
|
|
|
|
if (process.argv[2] === 'exe') buildDeclaration();
|
|
|
|
export async function buildDeclaration() {
|
|
const b = await build({
|
|
build: {
|
|
lib: {
|
|
entry: './src/main.ts',
|
|
formats: ['es'],
|
|
fileName: 'index.js'
|
|
},
|
|
outDir: './_temp/types'
|
|
},
|
|
plugins: [
|
|
dts({
|
|
rollupTypes: true,
|
|
declarationOnly: true
|
|
})
|
|
]
|
|
});
|
|
}
|