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

v2 non-esm version #260

Open
UweOhse opened this issue Apr 18, 2024 · 1 comment
Open

v2 non-esm version #260

UweOhse opened this issue Apr 18, 2024 · 1 comment

Comments

@UweOhse
Copy link

UweOhse commented Apr 18, 2024

If one bundles version 2 like this:
cd src && bun build --target browser --outfile ../blissv2.js index.js

would this be enough to create a valid non-esm/non-module version functionally equivalent to v1 shy, apart from the eventlistener-stuff?

--- blissv2.js  2024-04-18 11:58:12.194323965 +0000
+++ blissv2nomodule.js 2024-04-18 12:23:03.179546453 +0000
@@ -1,3 +1,4 @@
+;(function() {
 var __defProp = Object.defineProperty;
 var __export = (target, all) => {
   for (var name in all)
@@ -780,9 +781,5 @@
   add: add_default
 });
 var src_default = $_default;
-export {
-  src_default as default,
-  $_default as Bliss,
-  $$_default as $$,
-  $_default as $
-};
+window.Bliss=$_default;
+})();

?

Regards, Uwe

@LeaVerou
Copy link
Owner

LeaVerou commented Apr 19, 2024

Why do something like this and not just use rollup? I'd totally accept a PR that adds rollup to the repo itself.

Do note that bliss.global.js is a more standard name for this.

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

No branches or pull requests

2 participants