tsup, fix build

This commit is contained in:
peintnermax
2023-08-02 10:15:21 +02:00
parent 8a8afa22a0
commit 4164fc00dd
3 changed files with 2 additions and 16 deletions

View File

@@ -12,7 +12,7 @@
"./assets/*": "./dist/assets/*"
},
"scripts": {
"build": "tsup",
"build": "tsup src/index.tsx --format esm,cjs --dts --external react",
"test": "pnpm test:unit",
"test:watch": "pnpm test:unit:watch",
"test:unit": "jest",

View File

@@ -1,14 +0,0 @@
import { defineConfig, Options } from "tsup";
export default defineConfig((options: Options) => ({
treeshake: true,
splitting: true,
publicDir: true,
entry: ["src/index.tsx"],
format: ["esm"],
dts: true,
minify: true,
clean: true,
external: ["react"],
...options,
}));