build: two-step for packages/vendor build and README
This commit is contained in:
11
vendor/logger-console/tsdown.config.ts
vendored
11
vendor/logger-console/tsdown.config.ts
vendored
@@ -3,9 +3,10 @@ import { defineConfig } from 'tsdown'
|
||||
/**
|
||||
* logger-console ships two entries: the node exporter (index) and the
|
||||
* browser exporter (browser), selected via package.json `exports`
|
||||
* conditions. They are built as two single-entry passes so the shared
|
||||
* base class is inlined into each (matching upstream's published shape)
|
||||
* instead of split into a hash-named chunk.
|
||||
* conditions. The entries are JS emitted by tsc under lib/typings and are
|
||||
* bundled as two single-entry passes so the shared base class is inlined into
|
||||
* each (matching upstream's published shape) instead of split into a hash-named
|
||||
* chunk.
|
||||
*/
|
||||
const shared = {
|
||||
outDir: 'lib',
|
||||
@@ -18,6 +19,6 @@ const shared = {
|
||||
} as const
|
||||
|
||||
export default defineConfig([
|
||||
{ ...shared, entry: ['src/index.ts'] },
|
||||
{ ...shared, entry: ['src/browser.ts'] },
|
||||
{ ...shared, entry: ['lib/typings/index.js'] },
|
||||
{ ...shared, entry: ['lib/typings/browser.js'] },
|
||||
])
|
||||
|
||||
8
vendor/schemastery/tsdown.config.ts
vendored
8
vendor/schemastery/tsdown.config.ts
vendored
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user