Closed ExE-Boss closed 6 years ago
not sure what's the issue here ... if you import hyperHTML from 'hyperhtml/esm'
it works as well as const hyperHTML = require('hyperhtml/cjs')
.
I already use hyperHTML as ESM via https://unpkg.com/hyperhtml?module and since you are complaining there are many files to add, I don't see how adding yet another one would improve the situation.
On top of that, I've no idea what is Mozilla's dispensary ... maybe @marcoscaceres can also say something about that?
Mozilla’s dispensary contains hashes of audited JavaScript libraries which Mozilla has approved for use in Firefox extensions.
This is so that they don’t have to be re-reviewed when the extension is being reviewed for distribution on AMO, and the addons linter knows about them (this is so that when the library breaks a rule, it doesn’t prevent the extension from being submitted).
we use hyperHTML already in ABP and afaik shipping the min.js
hasn't been an issue at all.
If you need ESM and you are developing an extension you can simply import from the esm folder, right? I don't even know how your import would look like though, and if you use bundlers this effort would be wasted.
Again, not sure what's the benefit of a minified, bundled, ESM ... looks like the worst of all worlds
Add-on code must be written in a way that is reviewable and understandable. Reviewers may ask you to refactor parts of the code if it is not reviewable.
How is this going to work with a submitted, minified, ESM ?
Because files which are in the dispensary have been pre‑verified by Mozilla and the web‑ext
tool reports them as verified, so that reviewers know they can ignore them.
Also, when using vendor files, I store all my third party vendor files in a vendor
directory with a README.md
, which contains all the files and the link to their sources.
I have added the esm.js
file which is a bundled, minified, hyperHTML with ESM exports.
Right now, the only minified files are
umd.js
andmin.js
(which also has the unminifiedindex.js
).This makes it more difficult to add the hashes of the files from this project to Mozilla’s dispensary (see https://github.com/mozilla/dispensary/issues/465), as there are many files to add and the dispensary doesn’t yet support multi‑file libraries.