Skip to content

Commit

Permalink
fix: full CJS compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ctjlewis committed Jun 17, 2023
1 parent d3ffd0e commit b2d24b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions node.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exports = require("./dist/lib/openai/node.js");
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@
],
"exports": {
"./package.json": "./package.json",
"./node": "./node.js",
"./node": {
"import": "./node.js",
"require": "./node.cjs"
},
".": "./dist/index.js",
"./*": "./dist/*/index.js"
},
"scripts": {
"dev": "tsmodule dev",
"export-docs": "pnpm typedoc src",
"export": "tsmodule build",
"cjs": "tsmodule build -f cjs",
"cjs": "tsmodule build -b -f cjs",
"build": "pnpm export && pnpm export-docs",
"test": "ava",
"prepublishOnly": "pnpm test",
Expand Down Expand Up @@ -65,4 +68,4 @@
"releaseName": "v${version}"
}
}
}
}

1 comment on commit b2d24b3

@vercel
Copy link

@vercel vercel bot commented on b2d24b3 Jun 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.