buster/apps/server/tsup.config.ts

33 lines
957 B
TypeScript
Raw Permalink Normal View History

2025-07-11 02:49:46 +08:00
import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm'],
target: 'node22', // Bun is compatible with recent Node.js versions
platform: 'node',
outDir: 'dist',
clean: true,
dts: false, // Disable for now due to TypeScript file list errors
sourcemap: true,
minify: false, // Don't minify for bun runtime
splitting: false,
shims: false, // Bun doesn't need shims
external: [
// Mark all workspace packages as external to avoid bundling them
'@buster/access-controls',
'@buster/database',
'@buster/server-shared',
'@buster/slack',
'@buster/test-utils',
'@buster/typescript-config',
'@buster/vitest-config',
],
noExternal: [
// Bundle these specific packages if needed
],
esbuildOptions(options) {
// Additional esbuild options for bun compatibility
options.keepNames = true; // Preserve function names for better debugging
},
});