Open dcbr opened 6 months ago
@TimKieu Please continue this discussion here, as #230 is not relevant to it.
@dcbr Okay, I will try and reply here.
@TimKieu never tried it. Not sure. In examples we use fs
but you don't need that for signing. node-forge
is advertised as plain JS so should be runnable anywhere. It will depend on what you want to use from our packages and what we depend on. There are many places where we reference Buffer
because this was initially written for Node. So... the only way to figur this out would be to try. If you fail, you may identify what the problems are and report back here. Then it would be lovely if you created a PR. But even info would be helpful for someone else asking the same.
@vbuch Buffer is not compatible to edge-runtime, Please port to Uint8Array.
@TimKieu we are absolutely welcoming PRs.
@vbuch I found a good solution from Winamp Webamp using https://github.com/feross/buffer AKA Buffer for Browser similar to Nodejs. Now you can replace your Nodejs Buffer by this, it should work well first, before we port other run-time libs for edge/browser.
Originally posted by @TimKieu in https://github.com/vbuch/node-signpdf/issues/230#issuecomment-2029418559