I'm trying to build a project for a browser with "hashconnect" package. When I'm trying to bundle it with esbuild, I'm getting resolve errors related to nodejs.
I don't understand why the browser package has dependencies on the node.
Should I setup something on my side(like polyfills) or it is the package?
✘ [ERROR] Could not resolve "fs"
node_modules/@hashgraph/sdk/src/client/NodeClient.js:21:15:
21 │ import fs from "fs";
╵ ~~~~
The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle
for node? You can use "platform: 'node'" to do that, which will remove this error.
✘ [ERROR] Could not resolve "util"
node_modules/@hashgraph/sdk/src/client/NodeClient.js:22:17:
22 │ import util from "util";...
I'm trying to build a project for a browser with "hashconnect" package. When I'm trying to bundle it with esbuild, I'm getting resolve errors related to nodejs. I don't understand why the browser package has dependencies on the node.
Should I setup something on my side(like polyfills) or it is the package?