Skip to content

Commit 64baa5d

Browse files
authored
fix: add types exports in package.json (#8)
* fix: update exports types in `package.json` * fix: update exports types and import paths in `package.json` * 0.0.9 * chore: update readme
1 parent 5f77e1e commit 64baa5d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ npm install @hackmd/y-socketio-redis
88

99
## Usage
1010

11-
Server side:
11+
Server-side:
1212

1313
```js
1414
import { createYSocketIOServer, createWorker } from '@hackmd/y-socketio-redis'
1515
```
1616

17-
Client side:
17+
Client-side:
1818

1919
```js
20-
import { SocketIOProvider } from '@hackmd/y-socketio-redis/client'
20+
import { SocketIOProvider } from '@hackmd/y-socketio-redis/dist/client'
2121
```
2222

2323
---

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hackmd/y-socketio-redis",
3-
"version": "0.0.8",
3+
"version": "0.0.9",
44
"description": "Scalable Socket.IO provider for Yjs using redis",
55
"sideEffects": false,
66
"type": "module",
@@ -30,13 +30,16 @@
3030
"src/*"
3131
],
3232
"main": "./dist/index.js",
33+
"types": "./dist/index.d.ts",
3334
"exports": {
3435
"./package.json": "./package.json",
3536
".": {
37+
"types": "./dist/index.d.ts",
3638
"import": "./dist/index.js",
3739
"default": "./dist/index.cjs"
3840
},
39-
"./client": {
41+
"./dist/client": {
42+
"types": "./dist/client/index.d.ts",
4043
"import": "./dist/client/index.js",
4144
"default": "./dist/client/index.cjs"
4245
}

0 commit comments

Comments
 (0)