Closed j-hellenberg closed 2 years ago
Hi! Thanks for offering the contribution!
I'd really like to keep the scope of this project as small as possible, which includes avoiding new builds if possible.
Speaking as the primary maintainer, I'm reluctant to offer the extended build a browser-global
version because:
browser-global
builds are an anti-pattern now that all browsers have supported modules for quite a while — I don't think I'd even include one I were publishing this library from scratch today, since the ESM builds can be used directly (even for setting browser globals to be used in non-module scripts).npm
for package dependencies (e.g. so they show up here), so I'd like to steer people towards using that if possible.npm
or make your own build if you really need (as in your case).I hope it's okay if I decline the PR for now, but I'm happy to reconsider if we get more requests for this.
To that end:
I think that's some pretty good reasoning you came up with there.
Regarding your question about why we wanted to do this, I must admit it was mostly about convenience. We were doing a research project and used the library for our proof-of-concept implementation which required some of the extensions, mainly the largeBlob
extension (the profile page of the organisation we created for the project provides a very brief summary on the topic in case you're interested). Therefore, while we could probably have made it work using the module build with a bit more effort (or maybe a bit more experience on using modules in a non-module context, for that matter), we decided to go with the just-plug-it-into-a-script-tag-and-use-it-everywhere solution for our prototype.
Obviously, if we wanted to turn that prototype into a more fully-fledged solution, we'd put more attention to actually following conventions. Therefore, we're fully fine with you declining the proposal. We just wanted to bring it up in case it was missing due to an oversight instead of a conscious decision :slightly_smiling_face:
Hi all,
during a recent project we wanted to use the
browser-global
dist version but noticed it is only exported in the basic and not the extended variant. Therefore, we'd like to ask whether you would be interested in adding that version to thescript/build-js.js
. As we've already done that in our fork to get our project to work, I've also just submitted a small PR (#60) for that in case you want to take a look :slightly_smiling_face: