Skip to content

Commit

Permalink
fix default exports for cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
andogq committed Apr 16, 2024
1 parent 0eb1cab commit 27191f4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-students-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"windpipe": minor
---

fix default exports for cjs
28 changes: 22 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,28 @@
"scripts": {
"lint": "tsc && eslint .",
"format": "eslint --fix .",
"build": "tsup ./src/index.ts --format esm,cjs --dts --splitting --cjsInterop",
"build": "tsup ./src/index.ts",
"doc": "typedoc ./src --media ./media --plugin typedoc-plugin-extras --favicon ./media/favicon.ico --footerLastModified true --plugin typedoc-material-theme --themeColor '#03284e'",
"test": "vitest",
"ci:release": "npm run build && changeset publish"
},
"keywords": [],
"files": [
"dist"
"dist",
"README.md"
],
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"main": "./dist/index.cjs",
"types": "./dist/index.d.cts",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
"import": {
"default": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"require": {
"default": "./dist/index.cjs",
"types": "./dist/index.d.cts"
}
}
},
"author": {
Expand Down Expand Up @@ -55,5 +62,14 @@
},
"publishConfig": {
"access": "public"
},
"tsup": {
"format": [
"esm",
"cjs"
],
"dts": {
"footer": "export = Stream"
}
}
}

0 comments on commit 27191f4

Please sign in to comment.