build: two-step for packages/vendor build and README

This commit is contained in:
imccyu
2026-06-17 23:31:38 +08:00
parent 279e9f17eb
commit ec9b093cb0
11 changed files with 53 additions and 37 deletions

View File

@@ -2,12 +2,12 @@ import { defineConfig } from 'tsdown'
/**
* schemastery has no `"type": "module"` and publishes dual-format output
* (package.json: main → lib/index.cjs, module → lib/index.mjs). Pin the
* extensions explicitly — the defaults for a CommonJS package would emit
* .mjs/.js instead.
* (package.json: main → lib/index.cjs, module → lib/index.mjs). The entry is
* the JS emitted by tsc under lib/typings; pin the bundled extensions
* explicitly because the defaults for a CommonJS package would emit .mjs/.js.
*/
export default defineConfig({
entry: ['src/index.ts'],
entry: ['lib/typings/index.js'],
outDir: 'lib',
format: ['esm', 'cjs'],
platform: 'node',