Skip to content

Commit b0e9765

Browse files
committed
fix: imports (1)
1 parent 38f2694 commit b0e9765

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ jobs:
7171
${{ runner.os }}-
7272
- run: npm i -g pnpm
7373
- run: pnpm i
74-
- run: pnpm run clean || true
7574
- run: pnpm run build
76-
- run: pnpm run copy-files
7775
- run: pnpm dlx semantic-release@20 --branches main
7876
env:
7977
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,26 @@
2020
"*.mjs",
2121
"*.d.ts"
2222
],
23-
"main": "./index.js",
24-
"module": "./index.mjs",
23+
"main": "./dist/index.cjs",
24+
"types": "./dist/index.d.ts",
25+
"module": "./dist/index.js",
2526
"exports": {
26-
"require": "./index.js",
27-
"import": "./index.mjs"
27+
".": {
28+
"import": {
29+
"default": "./dist/index.js",
30+
"types": "./dist/index.d.ts"
31+
},
32+
"require": {
33+
"default": "./dist/index.cjs",
34+
"types": "./dist/index.d.ts"
35+
}
36+
}
2837
},
29-
"types": "./index.d.ts",
3038
"scripts": {
31-
"build-fast": "tsup src --format cjs,esm",
32-
"build": "pnpm run build-fast --dts",
33-
"copy-files": "cp dist/*.js dist/*.d.ts .",
34-
"clean": "rm -f *.js *.d.ts",
39+
"build": "tsup src --format cjs,esm --dts",
3540
"test": "vitest run",
3641
"size": "size-limit",
37-
"prepublishOnly": "pnpm run clean && pnpm run build && pnpm run copy-files"
42+
"prepublishOnly": "pnpm run build"
3843
},
3944
"size-limit": [
4045
{

0 commit comments

Comments
 (0)