Originally we expected @hoodie/client to run in browsers only, but we realized that we have to make it compatible with ServiceWorker and Node.js, too (e.g. for server-side rendering).
Currently url is optional and it defaults to location.origin, which only exists in browsers. So instead we should make this a required option, and default options.url to location.origin in the hoodie’s bundle code for /hoodie/client.js
Originally we expected
@hoodie/client
to run in browsers only, but we realized that we have to make it compatible with ServiceWorker and Node.js, too (e.g. for server-side rendering).Currently
url
is optional and it defaults tolocation.origin
, which only exists in browsers. So instead we should make this a required option, and defaultoptions.url
tolocation.origin
in the hoodie’s bundle code for /hoodie/client.js