2026-06-11 22:08:10 +08:00
|
|
|
import { defineConfig } from 'tsdown'
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* logger-console ships two entries: the node exporter (index) and the
|
|
|
|
|
* browser exporter (browser), selected via package.json `exports`
|
2026-06-20 00:26:02 +08:00
|
|
|
* conditions. The entries are JS emitted by tsc under lib/types and are
|
2026-06-17 23:31:38 +08:00
|
|
|
* 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.
|
2026-06-11 22:08:10 +08:00
|
|
|
*/
|
|
|
|
|
const shared = {
|
|
|
|
|
outDir: 'lib',
|
|
|
|
|
format: ['esm'],
|
|
|
|
|
platform: 'node',
|
|
|
|
|
target: 'es2024',
|
|
|
|
|
fixedExtension: false,
|
|
|
|
|
dts: false,
|
|
|
|
|
clean: false,
|
|
|
|
|
} as const
|
|
|
|
|
|
|
|
|
|
export default defineConfig([
|
2026-06-20 00:26:02 +08:00
|
|
|
{ ...shared, entry: ['lib/types/index.js'] },
|
|
|
|
|
{ ...shared, entry: ['lib/types/browser.js'] },
|
2026-06-11 22:08:10 +08:00
|
|
|
])
|