bluejava/zousan

Source in ES Modules?

Closed this issue · 2 comments

Thanks for your amazing lib in such a small size.
Any plan to provide an ES module form source?

The code is wrapped by UMD now. It's usable but forces to set the global name. And the AMD checking may also leads to some issues in special environment.

Since it's such a small library, including it in the upper application is useful. But the form now prevents tree-shaking etc.

I copy the source code into my project so far. Hope to use it as a dependency.

Hey Yuqian - thank you!

Yes, thats a good idea to provide an ES module as well. I'll add that to my TODO list and hopefully get around to it soon. (Also happy to merge a PR!)

Thanks for the reminder here! (I will leave this Issue open until I do it)

Got a chance to do this change. It is now published as 3.0.0.

Note - I upgraded the major version as it could potentially be a breaking change. I stopped assigning Zousan as a global variable by default.

Be sure and let me know if anyone runs into any issues using this with various bundlers/loaders/browsers.