From eae0327e12b890046d1ac203c3b6bdc8b43a04ff Mon Sep 17 00:00:00 2001 From: Ivan Baykov Date: Sat, 10 Jun 2023 17:02:38 +0300 Subject: [PATCH] fix: add imports types --- package.json | 4 ++-- src/VueSlickCarousel.vue | 2 +- src/{carousel.ts => carousel.types.ts} | 0 tsconfig.production.json | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) rename src/{carousel.ts => carousel.types.ts} (100%) diff --git a/package.json b/package.json index 76764b2..228b168 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.7.6", "main": "./dist/vue-slick-ts.umd.js", "module": "./dist/vue-slick-ts.es.js", - "types": "./dist/types/index.d.ts", + "types": "./dist/index.d.ts", "unpkg": "./dist/vue-slick-ts.umd.js", "files": [ "dist", @@ -11,7 +11,7 @@ ], "exports": { ".": { - "types": "./dist/types/index.d.ts", + "types": "./dist/index.d.ts", "require": "./dist/vue-slick-ts.umd.js", "import": "./dist/vue-slick-ts.es.js", "default": "./dist/vue-slick-ts.es.js" diff --git a/src/VueSlickCarousel.vue b/src/VueSlickCarousel.vue index 1886224..891ded4 100644 --- a/src/VueSlickCarousel.vue +++ b/src/VueSlickCarousel.vue @@ -9,7 +9,7 @@ import $ from "jquery"; import { onMounted, ref } from "vue"; import "slick-carousel"; import { carouselProps } from "./carousel.props"; -import { ListSlickEvents, SlickInstance, SlickBreakpoint, SlickDirection, ListSlickMethods } from './carousel' +import { ListSlickEvents, SlickInstance, SlickBreakpoint, SlickDirection, ListSlickMethods } from './carousel.types' const props = defineProps(carouselProps); const emits = defineEmits<{ diff --git a/src/carousel.ts b/src/carousel.types.ts similarity index 100% rename from src/carousel.ts rename to src/carousel.types.ts diff --git a/tsconfig.production.json b/tsconfig.production.json index fcc477a..1a723a0 100644 --- a/tsconfig.production.json +++ b/tsconfig.production.json @@ -3,7 +3,8 @@ "compilerOptions": { "declaration": true, "emitDeclarationOnly": true, - "outDir": "dist/types" + "outFile": "dist/index.d.ts", + "isolatedModules": false }, "include": ["./src/*"] }