2026-07-08 11:00:06 +08:00
|
|
|
import { defineConfig } from 'tsdown'
|
|
|
|
|
|
|
|
|
|
/**
|
2026-07-12 03:36:43 +08:00
|
|
|
* Package-shape override (see the root tsdown.config.ts): besides the default lib/index.js
|
|
|
|
|
* bundle, the worker BOOTSTRAP ships as its own sibling entry — `new Worker(new
|
|
|
|
|
* URL('./worker.js', import.meta.url))` loads it as a file, so it cannot be part of the index
|
|
|
|
|
* bundle.
|
2026-07-08 11:00:06 +08:00
|
|
|
*/
|
2026-07-08 12:55:14 +08:00
|
|
|
export default defineConfig([
|
|
|
|
|
{
|
|
|
|
|
entry: ['lib/types/index.js'],
|
|
|
|
|
outDir: 'lib',
|
|
|
|
|
format: ['esm'],
|
|
|
|
|
platform: 'node',
|
|
|
|
|
target: 'es2024',
|
|
|
|
|
fixedExtension: false,
|
|
|
|
|
dts: false,
|
|
|
|
|
clean: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
entry: ['lib/types/worker.js'],
|
|
|
|
|
outDir: 'lib',
|
|
|
|
|
format: ['esm'],
|
|
|
|
|
platform: 'node',
|
|
|
|
|
target: 'es2024',
|
|
|
|
|
fixedExtension: false,
|
|
|
|
|
dts: false,
|
|
|
|
|
clean: false,
|
|
|
|
|
},
|
|
|
|
|
])
|