Skip to content

Commit 0f89ab0

Browse files
authored
Fix mapping (#446)
1 parent 7f605b3 commit 0f89ab0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
"url": "https://croct.com"
1010
},
1111
"type": "module",
12-
"main": "./index.mjs",
13-
"types": "./index.d.mts",
12+
"main": "./index.js",
13+
"types": "./index.d.js",
1414
"exports": {
1515
"./*": {
16-
"import": "./*.mjs",
17-
"require": "./*.js"
16+
"import": "./*.js",
17+
"require": "./*.cjs"
1818
}
1919
},
2020
"engines": {
@@ -53,8 +53,9 @@
5353
"typescript": "^5.0.0"
5454
},
5555
"files": [
56-
"**/*.mjs",
5756
"**/*.js",
57+
"**/*.cjs",
58+
"**/*.mjs",
5859
"**/*.ts",
5960
"**/*.map"
6061
],

post-build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function findIndexFiles(dir, fileList = []) {
1414

1515
if (stats.isDirectory()) {
1616
findIndexFiles(filePath, fileList);
17-
} else if (/^index\.(js|mjs|cjs|ts)$/.test(file)) {
17+
} else if (/^index\.(js|mjs|cjs)$/.test(file)) {
1818
fileList.push(filePath);
1919
}
2020
}

0 commit comments

Comments
 (0)