Skip to content

Commit

Permalink
fix: export and module resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
sugar-cat7 committed Sep 8, 2024
1 parent e0247df commit 18b9d2a
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/casbin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"version": "1.0.1",
"description": "Casbin middleware for Hono",
"type": "module",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": {
Expand All @@ -16,14 +16,24 @@
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./helper": {
"import": {
"types": "./dist/helper/index.d.ts",
"default": "./dist/helper/index.js"
},
"require": {
"types": "./dist/helper/index.d.cts",
"default": "./dist/helper/index.cjs"
}
}
},
"files": [
"dist"
],
"scripts": {
"test": "vitest --run",
"build": "tsup ./src/index.ts --format esm,cjs --dts",
"build": "tsup ./src/index.ts ./src/helper/index.ts --format esm,cjs --dts",
"publint": "publint",
"release": "yarn build && yarn test && yarn publint && yarn publish"
},
Expand Down

0 comments on commit 18b9d2a

Please sign in to comment.