From 55c329e58a8b4870cb563f6befeba0e94a28a6f4 Mon Sep 17 00:00:00 2001 From: BobHemphill76 Date: Tue, 28 Jan 2025 09:45:14 -0700 Subject: [PATCH] fix: allow sub module imports [EXT-6147] (#756) --- package.json | 16 ++++++++++++++++ tsup.config.js | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 711f01d..f949cec 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,22 @@ ".": { "import": "./lib/index.mjs", "require": "./lib/index.cjs" + }, + "./keys": { + "import": "./lib/keys/index.mjs", + "require": "./lib/keys/index.cjs" + }, + "./requests": { + "import": "./lib/requests/index.mjs", + "require": "./lib/requests/index.cjs" + }, + "./requests/typings": { + "import": "./lib/requests//typingsindex.mjs", + "require": "./lib/requests/typings/index.cjs" + }, + "./utils": { + "import": "./lib/utils/index.mjs", + "require": "./lib/utils/index.cjs" } }, "engines": { diff --git a/tsup.config.js b/tsup.config.js index 8190546..793c2bf 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -1,7 +1,7 @@ import { defineConfig } from 'tsup' export default defineConfig({ - entry: ['src/index.ts'], + entry: ['src/index.ts','src/keys/index.ts','src/requests/index.ts','src/requests/typings/index.ts','src/utils/index.ts'], outDir: 'lib', format: ['cjs', 'esm'], dts: true,