-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add a Rollup-compatible ES modules build #9
Comments
Seems reasonable |
@gaearon I just thought of something (Although I haven't looked into this yet). Recreating this with ES6 will need to be done by hand I think, because if I rewrite it in ES6, the transpiled CJS will require it to be used like |
If you are only exporting a default. You can use this: https://www.npmjs.com/package/babel-plugin-add-module-exports. There were good reasons babel changed the behavior though: https://phabricator.babeljs.io/T2212#57710 |
Yeah, this is what I had in mind. I haven’t tried it though. |
@jamestalmage oh, thanks, I didn't know about the plugin. I just knew the reasons babel wouldn't do it. It's probably totally safe for this project, since there's just the one export. |
The build now comes from the files under the `es/` directory. closes #9
The build now comes from the es2015 files under the `es/` directory. closes #9
Thanks that worked great |
* feat(es2015): add es2015 implementation to support rollup The build now comes from the es2015 files under the `es/` directory. closes #9 * chore(package): add es files and lib files to npm files * chore(package): ensure build and test before publish * refactor(ponyfill): make Symbol const * chore(ponyfill test): update tests to look at built file * refactor(all): ensure only es6 feature used is modules
Redux depends on this library now, which breaks ES modules build of Redux. It would be great if we could offer an ES modules build of this library in
/es/
and pointjsxnext:main
to it.The text was updated successfully, but these errors were encountered: