Skip to content

Commit

Permalink
update builder to tsup
Browse files Browse the repository at this point in the history
  • Loading branch information
hxsggsz committed Jan 2, 2024
1 parent 1e2f181 commit 9e530af
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "hxform",
"private": false,
"version": "1.0.1",
"version": "1.0.2",
"type": "module",
"main": "./dist/index.es.js",
"module": "./dist/index.cjs.js",
"types": "./dist/useForm.d.ts",
"types": "./dist/index.d.ts",
"author": {
"name": "Victor Hugo hxsggsz",
"url": "https://www.linkedin.com/in/hxsggsz/"
Expand All @@ -31,7 +31,7 @@
"typescript"
],
"scripts": {
"build": "tsc && vite build",
"build": "tsup",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"test": "vitest",
"test:watch": "vitest --watch",
Expand Down
13 changes: 13 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "tsup";

export default defineConfig({
dts: true, // Generate .d.ts files
minify: false, // Minify output
sourcemap: false, // Generate sourcemaps
treeshake: true, // Remove unused code
splitting: true, // Split output into chunks
clean: true, // Clean output directory before building
outDir: "dist", // Output directory
entry: ["src/index.ts"], // Entry point(s)
format: ["esm", "cjs"], // Output format(s)
});

0 comments on commit 9e530af

Please sign in to comment.