Open kkimdev opened 6 years ago
Yes, indeed. Currently, I have not enough time for this. PR welcome.
@hgoebl I'm going to give this a try, I have an idea how to simplify the code and the import process overall. I'll try on a different branch and maybe discuss it separately based on the PR.
@serbanghita I guess a natural way to do is that feature-detect if browser supports es6 module, then export if so?
I'm not quite sure what exactly is this issue about. I came here to report thats it's hard to import it in my ES6 JS/TS project. I'm transpiling it to ES5 anyway, so I don't mind browser-side module support.
My issue is that it's:
import MobileDetect from 'mobile-detect'
, my error tells me that 'mobile-detect' doesn't have default exportsmobile-detect
gets itself to the global scope automatically and we can't contain it in our project with simple way. We want to avoid global scope pollution.Should I create new issue?
@Zielak this issue is for that :)
+1, ES6 import would be nice
Hello, please know to tell me if it already works with ES6, otherwise what a way to do!
Thank you!
Everybody is welcome to create a PR. Please keep in mind that the code is generated and the template is the thing which should carry the solution.
It would be great if mobile-detect supports ES6 module style :)