diff --git a/package.json b/package.json index 1e9d050..6d5ed9c 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,14 @@ "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": { - "import": "./build/index.js", - "default": "./build/index.js", - "types": "./build/index.d.ts" + ".": { + "require": "./build/index.js", + "import": "./build/index.mjs", + "types": "./build/index.d.ts" + } }, "files": [ "build" diff --git a/tsup.config.ts b/tsup.config.ts index 5dedfd7..4953fc3 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ outDir: 'build', target: 'node14', platform: 'node', - format: ['esm'], + format: ['esm', 'cjs'], splitting: false, sourcemap: true, minify: true,