fix(cli): tsdown define error

This commit is contained in:
pengzhanbo 2025-05-13 11:38:23 +08:00
parent 698ce3ef59
commit 6677dcae62
2 changed files with 2 additions and 8 deletions

View File

@ -1,9 +1,8 @@
import cac from 'cac'
import { version } from '../package.json'
import { Mode } from './constants.js'
import { run } from './run.js'
declare const __CLI_VERSION__: string
const cli = cac('create-vuepress-theme-plume')
cli
@ -16,6 +15,6 @@ cli
cli.help()
cli.version(__CLI_VERSION__)
cli.version(version)
cli.parse()

View File

@ -1,6 +1,5 @@
import type { Options } from 'tsdown'
import { defineConfig } from 'tsdown'
import { version } from './package.json'
export default defineConfig({
entry: ['src/index.ts'],
@ -8,8 +7,4 @@ export default defineConfig({
dts: true,
format: 'esm',
sourcemap: false,
clean: true,
define: {
__CLI_VERSION__: JSON.stringify(version),
},
}) as Options