Previously babel included Node polyfills to ensure that libraries relying on them in the browser context would work.
However, this stopped happening in newer versions which means if we want to update babel we need to either manually add those polyfills or rely on packages that don't require them.
In this patch we're replacing our use of crypto with hash.js to remove one of those dependencies.
In the work exploring this change I also considered createHmac as a dependency but the overall impact on build size was smalled with hash.js and a selective import (which allows only including the HMAC function we use).
~Do not merge until after #89 is merged~
Previously
babel
included Node polyfills to ensure that libraries relying on them in the browser context would work.However, this stopped happening in newer versions which means if we want to update
babel
we need to either manually add those polyfills or rely on packages that don't require them.In this patch we're replacing our use of
crypto
withhash.js
to remove one of those dependencies.In the work exploring this change I also considered
createHmac
as a dependency but the overall impact on build size was smalled withhash.js
and a selective import (which allows only including the HMAC function we use).