elgs / ip6

IPv6 address helper utilities.
https://ip6.sh
MIT License
20 stars 7 forks source link

Unexpected token "export" while installing this module #4

Closed ChaitanyaKaranam closed 4 years ago

ChaitanyaKaranam commented 4 years ago

The latest commit for ES6 support is not backward compatible. This is breaking while using it with require

elgs commented 4 years ago

Thanks for finding it. Do you think there's a way they can be together, or they have to be separated?

elgs commented 4 years ago

I fixed it by removing the exprts and added a separate ip6-es.js for ES6 support. Who TF got the mjs nonsense idea, how stupid!

I am sorry for the problem.

ChaitanyaKaranam commented 4 years ago

I fixed it by removing the exprts and added a separate ip6-es.js for ES6 support. Who TF got the mjs nonsense idea, how stupid!

I am sorry for the problem.

Awesome! Thanks for the quick fix. I will give it a try.

ChaitanyaKaranam commented 4 years ago

Thanks for finding it. Do you think there's a way they can be together, or they have to be separated?

@elgs We can use webpack and target it to UMD. This will in both client and server. Axios does this.

Let me know if you are accepting any PR's, I can give it a shot.

elgs commented 4 years ago

@ChaitanyaKaranam I do accept PR. Thank you. But I try to avoid any unnecessary dependencies. I think it's overkill to use Webpack for my tiny little one file project. Thank you for you advice though.