Skip to content

Commit

Permalink
fix: more explicit package.exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ruicsh committed Jan 5, 2024
1 parent 93de017 commit fd4735f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- run: |
npm ci
npm run lint
# npm run lint:ts
npm run lint:ts
npm run test:ci
test-coverage:
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,23 @@
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": [
{
"import": "./dist/index.mjs",
"require": "./dist/index.cjs",
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
},
"default": "./dist/index.mjs"
},
"./dist/index.mjs"
]
},
"types": "dist/index.d.ts",
"scripts": {
"build": "tsx ./sh/build.ts",
"coverage": "tsx sh/coverage.ts",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"declaration": true,
"esModuleInterop": true,
"lib": ["dom"],
"module": "commonjs",
"moduleResolution": "node",
"module": "ES2015",
"moduleResolution": "Bundler",
"outDir": "./dist",
"removeComments": true,
"strict": true,
Expand Down
File renamed without changes.

0 comments on commit fd4735f

Please sign in to comment.