Skip to content

Commit 8d5936e

Browse files
authored
docs: how to make wechat mini program runnable (#1885)
1 parent 82a4b79 commit 8d5936e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,8 +897,11 @@ const client = connect('mqtt://test.mosquitto.org')
897897
Supports [WeChat Mini Program](https://mp.weixin.qq.com/). Use the `wxs` protocol. See [the WeChat docs](https://mp.weixin.qq.com/debug/wxadoc/dev/api/network-socket.html).
898898

899899
```js
900+
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only' // import before mqtt.
900901
const mqtt = require("mqtt");
901-
const client = mqtt.connect("wxs://test.mosquitto.org");
902+
const client = mqtt.connect("wxs://test.mosquitto.org", {
903+
timerVariant: 'native' // more info ref issue: #1797
904+
});
902905
```
903906

904907
### Ali Mini Program

0 commit comments

Comments
 (0)