npm workspaces (packages/*, apps/*) with shared TypeScript, ESLint and
Jest setup and `npm run check`. @crosscode/contracts builds to CommonJS
and ESM (tsup) with the crosscode.<name>/<major> schema-name helpers.
packages/ui and apps/{accounts,website,app} are placeholders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
397 B
TypeScript
14 lines
397 B
TypeScript
import { defineConfig } from "tsup";
|
|
|
|
// Dual build: CommonJS for the Cross Events backend and the Hub (they `require`), ESM for the
|
|
// Next.js apps. Types for both.
|
|
export default defineConfig({
|
|
entry: ["src/index.ts"],
|
|
format: ["cjs", "esm"],
|
|
dts: true,
|
|
sourcemap: true,
|
|
clean: true,
|
|
target: "es2022",
|
|
outExtension: ({ format }) => ({ js: format === "esm" ? ".mjs" : ".js" }),
|
|
});
|