Skip to content

Commit

Permalink
add vite plugin for typescript declaration files (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
halocline authored Jul 29, 2024
1 parent 0e73deb commit 4f9233b
Show file tree
Hide file tree
Showing 3 changed files with 501 additions and 10 deletions.
4 changes: 3 additions & 1 deletion grommet-leaflet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@babel/preset-react": "^7.18.6",
"@types/leaflet": "^1.9.6",
"@types/leaflet.markercluster": "^1.5.2",
"@types/node": "^22.0.0",
"@types/react": "^18.2.23",
"@vitejs/plugin-react": "^4.2.1",
"del": "^7.1.0",
Expand Down Expand Up @@ -80,6 +81,7 @@
"simple-git": "^3.25.0",
"styled-components": "^5.1.0",
"typescript": "^5.2.2",
"vite": "^5.2.0"
"vite": "^5.2.0",
"vite-plugin-dts": "^3.9.1"
}
}
3 changes: 2 additions & 1 deletion grommet-leaflet/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { resolve } from 'path';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
import dts from 'vite-plugin-dts';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [peerDepsExternal(), react()],
plugins: [peerDepsExternal(), react(), dts()],
build: {
lib: {
entry: resolve(__dirname, 'src/index.js'),
Expand Down
Loading

0 comments on commit 4f9233b

Please sign in to comment.