Closed LoveLoliii closed 2 years ago
试试看yarn add buffer?
还是同样的错误
Dynamic require of "buffer" is not supported
哎 试试bilibili-live-ws@6.2.1
哎 试试bilibili-live-ws@6.2.1
查了一圈 看起来像是vite pre-building 过程中的问题。 这里看见的。
喔唷 那你解决了吗 还有一个办法是submodule然后直接作为ts import,ts代码应该是合格esm
哦不 esm似乎要加上扩展名 可能还不行😵💫
哦不 esm似乎要加上扩展名 可能还不行😵💫
这块还不太懂 我去学学😀
喔唷 那你解决了吗 还有一个办法是submodule然后直接作为ts import,ts代码应该是合格esm
我悟了 我不在渲染进程用了 我去主进程用。
没用过vite 你试试看👀
在electron的主进程用 是没问题的
太好啦!虽然有点可惜😭
您好~ 在vite-react-electron模板构建的一个electron项目中, 在渲染进程中使用
import { LiveWS } from 'bilibili-live-ws/browser'
运行提示:之后我就
yarn add pako
再次运行后 提示:browser.js 的第4行是这个:
const buffer_1 = require("buffer");