Closed Lonli-Lokli closed 3 years ago
Seems like a good thing! Would you create a PR? :)
I have some issues with this package for the same reason. To put it in context:
I'm using vue-grid-layout-v3 which uses your library. Everything is fine, until I try to use vue-grid-layout-v3
with Vite, which uses ESM packages under the hood. So it was throwing me errors like "element-resize-detector doesn't have a default export". So, it seems that the problem is that your library is not ESM compatible. I needs a rewrite... OR, maybe we can use a tools like: to-esm and generate different entry points.
What do you think? I haven't tried it, but seems promising. If you accept, I can try it.
Provide an ECMAScript module (ESM) bundle instead of only commonJS ref: https://web.dev/commonjs-larger-bundles/