Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add webpack sample #301

Merged
merged 2 commits into from
Feb 25, 2024
Merged

Add webpack sample #301

merged 2 commits into from
Feb 25, 2024

Conversation

OR13
Copy link
Contributor

@OR13 OR13 commented Feb 24, 2024

Objective of this pull request is to show the configuration necessary for libraries written in typescript, to emit js that can be bundled, that supports hpke-js.

This pull request should help anyone encountering #302 in the future.

For example, imagine a library like:

(jose or cose)-hpke written in typescript, that uses hpke-js.
Then (jose or cose)-hpke is used from node, or web applications with might use webpack.

Screenshot 2024-02-24 at 8 32 09 AM

I realize this is probably more "compiler and bundler basics", but if its easy to provide and sample that works, it may help developers consume hpke-js faster.

@OR13
Copy link
Contributor Author

OR13 commented Feb 24, 2024

I am not sure which parameters to change to resolve the issue, but I am happy to try any suggestions

@OR13
Copy link
Contributor Author

OR13 commented Feb 24, 2024

After some experiments, I was able to get this to work:

Screenshot 2024-02-24 at 9 18 53 AM

You may wish to simply close this PR, since there are no issues with your library, and this sample is perhaps not worth including, but hopefully anyone hitting these issues, may find this and save you another issue.

@OR13 OR13 marked this pull request as ready for review February 24, 2024 15:20
@dajiaji
Copy link
Owner

dajiaji commented Feb 25, 2024

@OR13 Thanks for the PR. I've confirmed that it works properly. I'll merge this PR as I think it'll be useful for other users.

@dajiaji dajiaji merged commit c62fb99 into dajiaji:main Feb 25, 2024
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants