Skip to content

Commit

Permalink
build: add separate configs for esm and cjs, with diff folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan-Zayne committed Jun 25, 2024
1 parent ae21281 commit 9190d6a
Show file tree
Hide file tree
Showing 4 changed files with 218 additions and 25 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-tips-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zayne-labs/callapi": patch
---

add separate configs for esm and cjs, with diff folders
16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "0.2.6",
"type": "module",
"description": "A lightweight wrapper over fetch with quality of life improvements like built-in request cancellation, retries, interceptors and more",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"scripts": {
"prepare": "husky",
"test:check-types": "tsc --pretty -p tsconfig.json",
Expand All @@ -17,14 +18,8 @@
},
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.cjs"
}
},
"publishConfig": {
Expand Down Expand Up @@ -52,6 +47,7 @@
],
"packageManager": "pnpm@9.4.0",
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@changesets/cli": "^2.27.5",
"@eslint/js": "^9.5.0",
"@zayne-labs/tsconfig": "^0.0.7",
Expand Down
Loading

0 comments on commit 9190d6a

Please sign in to comment.