kawanet / msgpack-lite

Fast Pure JavaScript MessagePack Encoder and Decoder / msgpack.org[JavaScript]
https://www.npmjs.com/package/msgpack-lite
MIT License
979 stars 126 forks source link

ES6 Modules + Rollup #49

Open Benjamin-Dobell opened 7 years ago

Benjamin-Dobell commented 7 years ago

I don't know if this is something you're interested in, so I figured I'd open an issue before submitting any pull requests.

Basically I've forked this repo and its dependencies and made them all into ES6 modules that build with rollup:

https://github.com/Benjamin-Dobell/msgpack-lite https://github.com/Benjamin-Dobell/event-lite https://github.com/Benjamin-Dobell/int64-buffer

You can't have circular dependencies in ES6 modules (although it's probably good to avoid them regardless) so unfortunately I did have to make some pretty drastic changes to the project. I haven't tried to make it pretty at this point, as I just wanted this done for my own purposes. However, if you're interested I'll submit pull requests and clean-up accordingly.

thetutlage commented 6 years ago

Yes there is a circular reference issue when using Rollup. I looked into files and they are circulary required.