Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Support webpack'ing hawk #276

Closed
djmitche opened this issue Oct 23, 2020 · 1 comment · Fixed by #277
Closed

Support webpack'ing hawk #276

djmitche opened this issue Oct 23, 2020 · 1 comment · Fixed by #277
Assignees

Comments

@djmitche
Copy link
Contributor

Currently, if the most recent version is used in a webpack'd context, it fails because dns and dgram are not available in a web context. Those are requirements of @hapi/sntp, which is an (optional) requirement of hawk on Node, but not something that a browser can use.

Probably the easiest option here is to remove the sntp dependency, replacing it with a few steps to enable it. Maybe

const Sntp = reqiure('@hapi/sntp');
const Hawk = require('hawk');

Sntp.start();
Hawk.setTimeFunction(Sntp.now)
@djmitche
Copy link
Contributor Author

djmitche commented Nov 2, 2020

It still depends on Buffer, url, stream, and crypto :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant