-
Notifications
You must be signed in to change notification settings - Fork 57
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
Feature/esmbuild #71
base: master
Are you sure you want to change the base?
Feature/esmbuild #71
Conversation
I don't like the idea of keeping bundled (compiled) files in repo. unpkg cdn-provider allows to use this module without minification import * as asn1js from "https://unpkg.com/asn1js?module"; |
Unpkg works great for me, thanks again for the tip. Having a "standardised" bundle in repo would serve a purpose anyways, enabling all cdn providers to serve the bundle. If that's not interesting, maybe we can revert the gitignore change but still build the bundle? (and let npm be the source of choice for Deno, and simplify browser usage) That would make this work: import { x } from "https://cdn.jsdelivr.net/npm/asn1js@2/build/asn1.bundle.mjs"; Edit: Force pushed a new version of this pull request, without repo-inclusion of |
6a33d3d
to
d406a2f
Compare
d406a2f
to
422f34f
Compare
I've published HTML <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script type="module">
import * as asn1js from "https://unpkg.com/asn1js?module";
const asn = new asn1js.Utf8String({
value: "Hello world",
});
console.log(asn.toString()); // ascii
console.log(asn.toString("hex"));
</script>
</body>
</html> Console
I don't like the idea of keeping the bundle file with included external dependencies in the NPM registry. I guess it's better to compile a bundle file on application later with env requirements. |
Upgraded fido2-lib @ webauthn-open-source/fido2-lib#85 . Works fine! |
Create bundled es-module
build/asn1.bundle.mjs
for simple browser usage, and Deno support.Add basic installation instructions
Includebuild/*
in repo for certain cdn-providers, e.g. deno.land/x or jsdeliver/gh