diff --git a/package.json b/package.json index 489a88e5..27938ddb 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,19 @@ "files": [ "dist" ], + "types": "./dist/main.d.ts", + "exports": { + ".": { + "import": "./dist/main.js", + "types": "./dist/main.d.ts" + } + }, "sideEffects": [ "**/*.css" ], "scripts": { "dev": "vite", - "build": "tsc --p ./tsconfig-build.json && vite build", + "build": "tsc -p ./tsconfig-build.json && vite build", "prepublish": "npm run build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", diff --git a/vite.config.ts b/vite.config.ts index 7e6d1527..56f633fd 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -13,7 +13,7 @@ export default defineConfig({ plugins: [ react(), libInjectCss(), - dts({ include: ['lib/components'] }), + dts({ include: ['lib'] }), ], css: { preprocessorOptions: {