Skip to content

Commit 62a31b8

Browse files
committed
build: fix types
1 parent 85886f0 commit 62a31b8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

vite.build.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ export const globals = {
2727
export const isIIFE = detectIIFE();
2828
export const formats: LibraryFormats[] = !isIIFE ? ["es", "cjs"] : ["iife"];
2929
export default defineConfig({
30-
plugins: [react(), !isIIFE && dts()],
30+
plugins: [
31+
react(),
32+
!isIIFE &&
33+
dts({
34+
insertTypesEntry: true, // Generate entry of types. Entry path is 'types' in package.json
35+
}),
36+
],
3137
build: {
3238
sourcemap: isIIFE,
3339
emptyOutDir: !isIIFE,

0 commit comments

Comments
 (0)