mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
33 lines
626 B
TypeScript
33 lines
626 B
TypeScript
import { type Options, defineConfig } from 'tsup'
|
|
|
|
const clientExternal: (string | RegExp)[] = [
|
|
/.*\.vue$/,
|
|
/.*\.css$/,
|
|
]
|
|
|
|
export default defineConfig(() => {
|
|
const DEFAULT_OPTIONS: Options = {
|
|
dts: true,
|
|
sourcemap: false,
|
|
splitting: false,
|
|
format: 'esm',
|
|
}
|
|
return [
|
|
// node
|
|
{
|
|
...DEFAULT_OPTIONS,
|
|
entry: ['./src/node/index.ts'],
|
|
outDir: './lib/node',
|
|
target: 'node18',
|
|
},
|
|
// client/config.js
|
|
{
|
|
...DEFAULT_OPTIONS,
|
|
entry: ['./src/client/config.ts'],
|
|
outDir: './lib/client',
|
|
dts: false,
|
|
external: clientExternal,
|
|
},
|
|
]
|
|
})
|