git » sdk » commit 170a880

Mention xmpp.js workaround

author Stephen Paul Weber
2026-03-15 19:18:23 UTC
committer Stephen Paul Weber
2026-03-15 19:19:42 UTC
parent 755c27c264d687f03aa9bbbb5a006e276159c4b2

Mention xmpp.js workaround

README.md +20 -0
docs/js/index.md +20 -0

diff --git a/README.md b/README.md
index b11292c..198f3d9 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,26 @@ Also Typescript typings are generated which include documenation comments.
 
     npm install https://gitpkg-singpolyma.vercel.app/snikket-im/snikket-sdk/npm?compiled
 
+There is a known bug in one of our JavaScript dependencies for browser builds, if xmpp.js is <= 0.14.0 then you may need something like this vite.config.js example
+
+```js
+resolve: {
+	alias: {
+		// https://github.com/xmppjs/xmpp.js/issues/1093
+		"node:dns": "./src/dns-stub.js",
+	},
+},
+```
+
+And then the stub:
+
+```js
+export default {
+	lookup: (x, y, cb) => cb(null, []),
+	resolveSrv: (x, cb) => cb(null, []),
+};
+```
+
 # C
 
 `libborogove.so` and `cpp/borogove.h`, the latter has documentation comments.
diff --git a/docs/js/index.md b/docs/js/index.md
index 06deb37..d659ef9 100644
--- a/docs/js/index.md
+++ b/docs/js/index.md
@@ -6,6 +6,26 @@ This guide quickly brings you up to speed on Borogove's JavaScript API. The API
 npm i https://gitpkg-singpolyma.vercel.app/snikket-im/snikket-sdk/npm?compiled
 ```
 
+There is a known bug in one of our JavaScript dependencies for browser builds, if xmpp.js is <= 0.14.0 then you may need something like this vite.config.js example
+
+```js
+resolve: {
+	alias: {
+		// https://github.com/xmppjs/xmpp.js/issues/1093
+		"node:dns": "./src/dns-stub.js",
+	},
+},
+```
+
+And then the stub:
+
+```js
+export default {
+	lookup: (x, y, cb) => cb(null, []),
+	resolveSrv: (x, cb) => cb(null, []),
+};
+```
+
 ## Chat Client
 
 Let's get started by  initializing the client and setting the current user and persistence layer: