Skip to content

Commit

Permalink
Export .d.ts types with package
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeu committed Mar 12, 2023
1 parent 637f5ef commit 2a31e64
Show file tree
Hide file tree
Showing 3 changed files with 268 additions and 16 deletions.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dist/",
"src/"
],
"types": "./dist/src/lib.d.ts",
"repository": {
"type": "git",
"url": "git@github.com:vue-leaflet/vue-leaflet.git"
Expand All @@ -32,12 +33,17 @@
"vue": "^3.2.25"
},
"peerDependencies": {
"@types/leaflet": "^1.5.7",
"leaflet": "^1.6.0"
},
"peerDependenciesMeta": {
"@types/leaflet": {
"optional": true
}
},
"devDependencies": {
"@rushstack/eslint-patch": "^1.2.0",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/leaflet": "^1.5.7",
"@types/node": "^18.13.0",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
Expand All @@ -53,6 +59,7 @@
"ts-debounce": "^4.0.0",
"typescript": "^4.9.5",
"vite": "^4.1.1",
"vite-plugin-dts": "^2.1.0",
"vitepress": "^0.6.0",
"vitest": "^0.28.5",
"vue-router": "^4.0.0-rc.5",
Expand Down
3 changes: 2 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import vue from "@vitejs/plugin-vue";
import { URL, fileURLToPath } from "node:url";
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
plugins: [vue(), dts()],
resolve: {
alias: {
"@src": fileURLToPath(new URL("./src", import.meta.url)),
Expand Down
Loading

0 comments on commit 2a31e64

Please sign in to comment.