composablesys/collabs

randomReplicaID: Avoid require("crypto")

mweidner037 opened this issue · 1 comments

In randomReplicaID, we use Node's crypto library to get random bytes on NodeJS. Importing this library confuses Webpack even though it is only used on Node. Our current workaround uses eval("require"))("crypto"), but that causes warnings from Rollup. It would be nice to avoid these warnings.