8000 refactor: switch to tsdown by sxzz · Pull Request #938 · vue-macros/vue-macros · GitHub
[go: up one dir, main page]

Skip to content

refactor: switch to tsdown #938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix monoman
  • Loading branch information
sxzz committed May 13, 2025
commit a51c3a2ff9d5bb8545c2a2e2cf5b35109c2c8193
12 changes: 8 additions & 4 deletions monoman.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
noDuplicatedPnpmLockfile,
} from 'monoman'
import { docsLink, githubLink } from './macros/repo'
import type { BuildConfig } from './tsdown.config'
import type { PackageJson } from 'pkg-types'
import type { Options } from 'tsdown'

const jiti = createJiti(import.meta.url)

Expand Down Expand Up @@ -119,11 +119,15 @@ export default unplugin.${entry} as typeof unplugin.${entry}\n`,

const tsdownFile = path.resolve(pkgRoot, 'tsdown.config.ts')
if (!data.meta?.skipExports && (await exists(tsdownFile))) {
const tsdownConfig: Options = (
await jiti.import<{ default: Options }>(tsdownFile)
const tsdownConfig = (
await jiti.import<{ default: BuildConfig }>(tsdownFile)
).default
const entry = tsdownConfig?.onlyIndex
? ['./src/index.ts']
: ['./src/*.ts', '!./**.d.ts']

const entries = (
await fg(tsdownConfig.entry as string[], {
await fg(entry, {
cwd: pkgRoot,
absolute: true,
})
Expand Down
0