mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
25 lines
487 B
TypeScript
25 lines
487 B
TypeScript
import type { Options } from 'tsup'
|
|
import { defineConfig } from 'tsup'
|
|
import { argv } from '../../scripts/tsup-args.js'
|
|
|
|
export default defineConfig(() => {
|
|
const DEFAULT_OPTIONS: Options = {
|
|
dts: true,
|
|
sourcemap: false,
|
|
splitting: false,
|
|
format: 'esm',
|
|
}
|
|
const options: Options[] = []
|
|
|
|
if (argv.node) {
|
|
options.push({
|
|
...DEFAULT_OPTIONS,
|
|
entry: ['./src/index.ts'],
|
|
outDir: './lib',
|
|
target: 'node18',
|
|
})
|
|
}
|
|
|
|
return options
|
|
})
|