-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ES6 modules #171
Comments
Not for the foreseeable future, no. |
Hey @blakeembrey would you accept a PR with an ES6 module for this library? Bundles widely support ESM so it doesn't make much of a difference for them. For a direct use (including in a web app to a global scope), well, with a breaking change devs have minimal work to do to upgrade to a new major version. |
I'd probably release it alongside a rewrite of the library. The main thing I don't want to be doing is maintaining two versions or breaking existing node use-cases. Since all supported node versions now have ESM support, it should be easier, but it's still hard for people to migrate. |
why would they need to migrate? Of course it requires adding a build step, but that's trivial with microbundle or similar. |
You don't need to refactor, but you do need a build/bundle step. Just delete your module wrapper code and use rollup or something similar to bundle different versions. Reference those in package.json The output from rollup is very clean. |
I'd be nice if the CJS exports of this module would be statically analyzeable, so things like https://github.com/nodejs/cjs-module-lexer can provide named exports when importing it in ESM. If it would assign it's exported to |
Hi, are there any plans to migrate this module to ES6 modules?
The text was updated successfully, but these errors were encountered: