diff --git a/package.json b/package.json index 7f5924f..22c1621 100644 --- a/package.json +++ b/package.json @@ -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/" @@ -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", diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..f2399ed --- /dev/null +++ b/tsup.config.ts @@ -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) +});