composablesys / collabs

Collabs library monorepo

Home Page:https://collabs.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

randomReplicaID: Avoid require("crypto")

mweidner037 opened this issue · 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.