Skip to content

Commit 298283e

Browse files
committed
fix(useMqtt): vite Buffer error
1 parent 543648c commit 298283e

File tree

2 files changed

+4540
-4245
lines changed

2 files changed

+4540
-4245
lines changed

hooks/useMqtt/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable max-params */
22
/* eslint-disable prefer-promise-reject-errors */
33
import { useRef, useState, useEffect } from 'react';
4-
import mqtt from 'mqtt';
4+
import * as mqtt from 'mqtt/dist/mqtt';
55
import { useUnmount } from '@pansy/use-unmount';
66
import { useLatest } from '@pansy/use-latest';
77
import { useBoolean } from '@pansy/use-boolean';

0 commit comments

Comments
 (0)