From c7fe95447fc71e9e0f04d70388f14051ab1ec7e9 Mon Sep 17 00:00:00 2001 From: Anton Lavrenov Date: Sun, 11 Aug 2024 17:16:57 -0500 Subject: [PATCH] add ts file --- package.json | 2 +- vite.config.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 9da6206..7dab160 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "url": "https://github.com/konvajs/vue-konva/issues" }, "scripts": { - "build": "vite build", + "build": "vite build && cp ./index.d.ts ./dist/index.d.ts", "test": "vitest" }, "peerDependencies": { diff --git a/vite.config.ts b/vite.config.ts index 9ba81c5..7e795cf 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,10 +3,12 @@ import { defineConfig } from 'vitest/config'; import dts from 'vite-plugin-dts'; export default defineConfig({ - plugins: [dts({ - entryRoot: './src', - include: ['./src/index.ts', './*.d.ts'], - })], + plugins: [ + dts({ + entryRoot: './src', + include: ['./src/index.ts', './*.d.ts'], + }), + ], build: { lib: { entry: resolve(__dirname, 'src'),