- Switch from external whitelist to noExternal blacklist in tsup config - Add post-build verification to catch missing published dependencies - Only bundle msedge-tts (pnpm-only), pass through all other deps
20 lines
460 B
TypeScript
20 lines
460 B
TypeScript
import { defineConfig } from 'tsup'
|
|
|
|
export default defineConfig({
|
|
entry: {
|
|
cli: 'src/cli.ts',
|
|
index: 'src/index.ts',
|
|
},
|
|
format: ['esm'],
|
|
target: 'node20',
|
|
platform: 'node',
|
|
splitting: true,
|
|
sourcemap: true,
|
|
dts: true,
|
|
clean: true,
|
|
outDir: 'dist-publish/dist',
|
|
// Force-bundle packages that can't be installed via npm
|
|
// (msedge-tts has `preinstall: npx only-allow pnpm` which blocks npm users)
|
|
noExternal: ['msedge-tts'],
|
|
})
|