Skip to content

Commit 73ae1d4

Browse files
fix(esm): fix ESM types by adding index.d.mts
Fixes #205
1 parent 767d79c commit 73ae1d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jspm_packages
4343
# Build files
4444
cjs/
4545
dist/
46+
esm/index.d.mts
4647

4748
# Vim swap files
4849
*.swp

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
"author": "Mark <[email protected]>",
66
"main": "./cjs/index.js",
77
"module": "./esm/index.mjs",
8-
"types": "./cjs/index.d.ts",
98
"exports": {
10-
"types": "./cjs/index.d.ts",
119
"import": "./esm/index.mjs",
1210
"require": "./cjs/index.js"
1311
},
1412
"scripts": {
1513
"build": "run-s build:*",
1614
"build:cjs": "tsc",
15+
"build:esm": "awk '!/sourceMappingURL/' cjs/index.d.ts > esm/index.d.mts",
1716
"build:umd": "rollup --config --failAfterWarnings",
1817
"clean": "rm -rf cjs coverage dist",
1918
"lint": "eslint --ignore-path .gitignore .",

0 commit comments

Comments
 (0)