From e7a9fab8ea0c3e189b33233b8af75b0b61a56c22 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Mon, 5 Dec 2022 03:17:14 -0600 Subject: [PATCH] feat: remove cjs build --- legacy/package.json | 7 ++++--- legacy/tsup.config.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/legacy/package.json b/legacy/package.json index 7655803a..567cea3c 100644 --- a/legacy/package.json +++ b/legacy/package.json @@ -5,12 +5,13 @@ "author": "Travis Fischer ", "repository": "transitive-bullshit/chatgpt-api", "license": "MIT", + "type": "module", + "source": "./src/index.ts", "types": "./build/index.d.ts", - "module": "./build/index.mjs", "exports": { ".": { - "require": "./build/index.js", - "import": "./build/index.mjs", + "import": "./build/index.js", + "default": "./build/index.js", "types": "./build/index.d.ts" } }, diff --git a/legacy/tsup.config.ts b/legacy/tsup.config.ts index 4953fc3f..5dedfd7c 100644 --- a/legacy/tsup.config.ts +++ b/legacy/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ outDir: 'build', target: 'node14', platform: 'node', - format: ['esm', 'cjs'], + format: ['esm'], splitting: false, sourcemap: true, minify: true,