Closed kabapy closed 2 years ago
Found a fix https://github.com/feross/buffer
you have to install a polyfill for Buffer
npm install buffer
then import it in main.js and make it global using
import { Buffer } from "buffer"; window.Buffer = window.Buffer || Buffer;
Yes this is the fix. You cannot actually import all the modules in a browser but you can import some without polyfills. For the Invertible Bloom filter yes you need to install this package for a browser usage. See the warning https://github.com/Callidon/bloom-filters#invertible-bloom-filters
environment is a quasar+vite+vue3
vue-router.mjs:3428 ReferenceError: Buffer is not defined at cell.js:178:76 at node_modules/bloom-filters/dist/iblt/cell.js (cell.js:200:1) at require (chunk-OL3AADLO.js?v=aca5486d:9:50) at node_modules/bloom-filters/dist/iblt/invertible-bloom-lookup-tables.js (invertible-bloom-lookup-tables.js:84:30) at __require (chunk-OL3AADLO.js?v=aca5486d:9:50) at node_modules/bloom-filters/dist/api.js (api.js:54:40) at require (chunk-OL3AADLO.js?v=aca5486d:9:50) at dep:bloom-filters:1:16