Skip to content

Commit 7ec135d

Browse files
committed
chore: support cjs
1 parent 2541b89 commit 7ec135d

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

package.json

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
{
22
"name": "blive-message-listener",
3-
"version": "0.1.5",
3+
"version": "0.1.6",
44
"description": "Bilibili-live danmu listener with type",
5-
"type": "module",
65
"main": "dist/index.js",
6+
"module": "dist/index.mjs",
77
"types": "dist/index.d.ts",
88
"homepage": "https://github.com/ddiu8081/blive-message-listener#readme",
99
"repository": {
1010
"type": "git",
1111
"url": "https://github.com/ddiu8081/blive-message-listener"
1212
},
13+
"author": "ddiu8081 <[email protected]>",
14+
"license": "MIT",
1315
"scripts": {
1416
"dev": "tsup --watch",
1517
"build": "tsup"
1618
},
19+
"exports": {
20+
".": {
21+
"require": "./dist/index.js",
22+
"import": "./dist/index.mjs"
23+
}
24+
},
1725
"files": [
1826
"dist"
1927
],
@@ -23,8 +31,7 @@
2331
"danmaku",
2432
"danmu"
2533
],
26-
"author": "ddiu8081 <[email protected]>",
27-
"license": "MIT",
34+
"sideEffects": false,
2835
"dependencies": {
2936
"bilibili-live-ws": "^6.2.1"
3037
},

tsup.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineConfig } from 'tsup'
22

33
export default defineConfig({
4-
format: ['esm'],
4+
format: ['esm', 'cjs'],
55
entry: ['src/index.ts'],
66
dts: true,
77
clean: true,

0 commit comments

Comments
 (0)