From 5ff4d04dfe2aa9b1b5a826859eb8b2efd9b923fe Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 2 Jun 2023 14:37:36 +0900 Subject: [PATCH] fix: type definition files in `exports` field (fix #1398) --- apps/calendar/package.json | 10 ++++++++-- apps/react-calendar/package.json | 10 ++++++++-- apps/vue-calendar/package.json | 10 ++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/apps/calendar/package.json b/apps/calendar/package.json index 5b2900ffa..9dbe09f87 100644 --- a/apps/calendar/package.json +++ b/apps/calendar/package.json @@ -10,8 +10,14 @@ "module": "./dist/toastui-calendar.mjs", "exports": { ".": { - "import": "./dist/toastui-calendar.mjs", - "require": "./dist/toastui-calendar.js" + "import": { + "types": "./types/index.d.ts", + "default": "./dist/toastui-calendar.mjs" + }, + "require": { + "types": "./types/index.d.ts", + "default": "./dist/toastui-calendar.js" + } }, "./ie11": "./dist/toastui-calendar.ie11.js", "./esm": "./dist/toastui-calendar.mjs", diff --git a/apps/react-calendar/package.json b/apps/react-calendar/package.json index 5798609fe..17f063df8 100644 --- a/apps/react-calendar/package.json +++ b/apps/react-calendar/package.json @@ -16,8 +16,14 @@ "types": "./types/index.d.ts", "exports": { ".": { - "import": "./dist/toastui-react-calendar.mjs", - "require": "./dist/toastui-react-calendar.js" + "import": { + "types": "./types/index.d.ts", + "default": "./dist/toastui-react-calendar.mjs" + }, + "require": { + "types": "./types/index.d.ts", + "default": "./dist/toastui-react-calendar.js" + } }, "./ie11": "./dist/toastui-react-calendar.ie11.js", "./esm": "./dist/toastui-react-calendar.mjs" diff --git a/apps/vue-calendar/package.json b/apps/vue-calendar/package.json index 68f0c52d9..c5776d50d 100644 --- a/apps/vue-calendar/package.json +++ b/apps/vue-calendar/package.json @@ -8,8 +8,14 @@ "module": "./dist/toastui-vue-calendar.mjs", "exports": { ".": { - "import": "./dist/toastui-vue-calendar.mjs", - "require": "./dist/toastui-vue-calendar.js" + "import": { + "types": "./index.d.ts", + "default": "./dist/toastui-vue-calendar.mjs" + }, + "require": { + "types": "./index.d.ts", + "default": "./dist/toastui-vue-calendar.js" + } }, "./ie11": "./dist/toastui-vue-calendar.ie11.js", "./esm": "./dist/toastui-vue-calendar.mjs"