Files
deepseek-harness/tsdown.config.ts
T

28 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-06-11 22:08:10 +08:00
import { defineConfig } from 'tsdown'
/**
2026-07-14 16:21:41 +08:00
* JS bundling for vendored Cordis and Harness TypeScript packages.
* TypeScript source is compiled first by `tsc -b tsconfig.build.json`; tsdown
2026-06-20 00:26:02 +08:00
* reads only the emitted JS under lib/types and writes lib/index.* runtime
* bundles. Declarations are NOT produced here, hence `dts: false`.
2026-06-11 22:08:10 +08:00
*
* Per-package shape overrides live in `<package>/tsdown.config.ts`
* (schemastery: dual ESM+CJS; logger-console: extra browser entry).
*/
export default defineConfig({
2026-07-14 16:21:41 +08:00
// Explicit globs keep bundling to vendored Cordis and the TypeScript package tree;
// `workspace: true` would discover package manifests outside that bundle set. Landlock
// platform packages contain only a prebuilt native binary, so they have no JS entry.
workspace: ['vendor/*', 'packages/*/*'],
2026-06-20 00:26:02 +08:00
entry: ['lib/types/index.js'],
2026-06-11 22:08:10 +08:00
outDir: 'lib',
format: ['esm'],
platform: 'node',
target: 'es2024',
// All packages set "type": "module"; fixedExtension false keeps ESM output
// at .js (not .mjs), matching the package.json main/exports fields.
fixedExtension: false,
dts: false,
clean: false,
})