From d3c9c0c8512427e36e3531f978c10faeec3a30ed Mon Sep 17 00:00:00 2001 From: Jared Wray Date: Sun, 28 Dec 2025 13:05:28 -0800 Subject: [PATCH] feat: adding in jsx support on build --- package.json | 4 ++-- tsup.config.ts | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 tsup.config.ts diff --git a/package.json b/package.json index e33cfd3..a951aad 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ "lint": "biome check --write --error-on-warnings", "test": "pnpm lint && vitest run --coverage", "test:ci": "biome check --error-on-warnings && vitest run --coverage", - "build": "rimraf ./dist && tsup src/index.ts --format esm --dts", + "build": "tsup", "clean": "rimraf ./dist pnpm-lock.yaml node_modules coverage", - "prepare": "rimraf ./dist && pnpm build" + "prepare": "pnpm build" }, "keywords": [ "hyphen", diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..c07c484 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: ['esm'], + dts: true, + clean: true, + esbuildOptions(options) { + options.jsx = 'automatic'; + }, +});