switch to tsup for build

nulfrost f9cfd1c4 42796f70

+8 -2
package.json
··· 22 22 "format": "biome format --write ./src", 23 23 "test": "vitest --run", 24 24 "lex-gen": "lex gen-api ./src/leaflet/lexicons ./lexicons/pub/leaflet/* ./lexicons/pub/leaflet/*/* ./lexicons/com/atproto/*/* --yes", 25 - "typecheck": "tsc --noEmit", 26 - "build": "rm -rf dist && tsc" 25 + "typecheck": "tsc", 26 + "build": "rm -rf dist && tsup" 27 27 }, 28 28 "license": "MIT", 29 29 "files": [ ··· 31 31 ], 32 32 "type": "module", 33 33 "main": "dist/index.js", 34 + "exports": { 35 + ".": { 36 + "import": "./dist/index.js", 37 + "require": "./dist/index.cjs" 38 + } 39 + }, 34 40 "devDependencies": { 35 41 "@atproto/lex-cli": "^0.9.1", 36 42 "@biomejs/biome": "2.1.3",
+1
tsconfig.json
··· 17 17 "moduleResolution": "bundler", 18 18 "rootDir": "src", 19 19 "sourceMap": true, 20 + "noEmit": true, 20 21 "declaration": true 21 22 }, 22 23 "include": ["./src"],
+9
tsup.config.ts
··· 1 + import { defineConfig } from "tsup"; 2 + 3 + export default defineConfig({ 4 + entryPoints: ["src/index.ts"], 5 + format: ["cjs", "esm"], 6 + dts: true, 7 + outDir: "dist", 8 + clean: true, 9 + });