diff --git a/package.json b/package.json index de67c28..1399290 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,10 @@ "require": "./dist/petite-vue.umd.js" } }, + "types": "./dist/types/index.d.ts", "scripts": { "dev": "vite", - "build": "vite build", + "build": "vite build && tsc --emitDeclarationOnly && mv dist/src dist/types", "prepublishOnly": "tsc --noEmit && yarn build" }, "repository": { diff --git a/tsconfig.json b/tsconfig.json index 869c4c4..ca9c7c8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "baseUrl": ".", "outDir": "dist", + "declaration": true, "sourceMap": false, "target": "esnext", "module": "esnext",