I intend to make browser game and connect to nakama-server with js-client.
I try to bundle my code to single js file. Currently with Parcel.
What is confusing to me is that in my dist/module.js it still imports Buffer which is not there in Browser obviously. Is there an example where js-client is used from Browser and bundled as single js file? Any other bundler example like webpack eg. would be fine as well. Maybe my understanding is completly wrong and the js-client is not meant to run from browser ?
import {Buffer as $7yCv0$Buffer} from "buffer";
//i can find this code in nakama-js.esm.mjs under my node_modules
var _btoa = _hasbtoa ? (bin) => btoa(bin) : _hasBuffer ? (bin) => Buffer.from(bin, "binary").toString("base64") : btoaPolyfill;
Media: