Files
v10/packages/react-native/react-native-media-elements/tsup.config.ts
T
Christian PillsburyandClaude 7403cc7281 feat: migrate entire monorepo from tsc to tsup for production builds
- Add tsup as build tool across all 15 packages for fast, optimized library building
- Generate dual CommonJS (.js) and ESM (.mjs) formats with proper package.json exports
- Add automatic TypeScript declaration files (.d.ts/.d.mts) for both formats
- Configure external dependencies to prevent bundling bloat in library packages
- Fix import paths to use proper package imports instead of relative paths
- Add source maps and clean build outputs optimized for library distribution
- Achieve 10-100x faster build performance compared to pure TypeScript compilation
- Support JSX/TSX compilation for React packages with CSS handling
- Maintain compatibility with existing TypeScript project references and monorepo structure

All packages now produce production-ready distributions compatible with both legacy and modern JavaScript environments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 14:23:10 -07:00

21 lines
435 B
TypeScript

import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.tsx'],
format: ['cjs', 'esm'],
clean: true,
sourcemap: true,
outDir: 'dist',
external: [
// Keep all dependencies external for library builds
/^@vjs-10\//,
/^[^.]/,
],
// Generate TypeScript declarations with custom config
dts: {
compilerOptions: {
composite: false,
incremental: false,
},
},
});