WICG / inert

Polyfill for the inert attribute and property.
Other
922 stars 79 forks source link

Transpile the module export #155

Closed JoviDeCroock closed 3 years ago

JoviDeCroock commented 4 years ago

Hey all,

Thanks for this awesome lib, I noticed that for the module export you're using src/index.js this fails in IE11 because it has ES6 syntax like const. My proposal is to ship an ES5 variant as well, this could be done by leveraging rollup to produce two bundles rather than only the CJS variant.

The problem is that in for instance webpack we can't selectively opt to pick main for one library, the order will be module, main and browser most of the time.

Relevant issue: https://github.com/FormidableLabs/nuka-carousel/issues/696

sebnitu commented 3 years ago

Agreed with this. As a workaround, since the main field is a UMD format, you can just point to that file directly:

import 'wicg-inert/dist/inert';