Skip to content

Commit d2c6b8a

Browse files
authored
fix: publish mod.mjs (#87)
1 parent e5b05d2 commit d2c6b8a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"type": "git"
88
},
99
"main": "dist/index.js",
10-
"module": "mod.js",
10+
"module": "mod.mjs",
1111
"types": "dist/index.d.ts",
1212
"exports": {
1313
".": {
14-
"import": "./mod.js",
14+
"import": "./mod.mjs",
1515
"require": "./dist/index.js"
1616
},
1717
"./package.json": "./package.json",
@@ -20,6 +20,7 @@
2020
"files": [
2121
"dist",
2222
"!**/__test__/**",
23+
"/mod.mjs",
2324
"/mod.js",
2425
"/mod.d.ts"
2526
],
@@ -28,7 +29,7 @@
2829
"test:cov": "jest --coverage",
2930
"build": "rollup -c",
3031
"toc": "markdown-toc -i README.md",
31-
"prepublishOnly": "npm run build",
32+
"prepublishOnly": "npm run build && cp mod.js mod.mjs",
3233
"docs:api": "typedoc --out api-doc --readme none --exclude \"**/__test__/**\" --theme minimal"
3334
},
3435
"author": "egoist <0x142857@gmail.com>",

0 commit comments

Comments
 (0)