-
Notifications
You must be signed in to change notification settings - Fork 54
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
Align main with changes needed for hybrid publish #1199
Conversation
b193059
to
a929c32
Compare
a929c32
to
032e2c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you're reverting pretty much all of the PR you did for the hybrid mode, what changes are left to support ECMA?
The first approach where to create different builds, but our usage of different packages for each platform made it impossible, and the solution was almost duplicate all code to different versions, to support the different chains of import statements types. But apparently, if the whole package compiled to common, and at the starting point common put export default ecma know how to deal with it from there. Not true for the opposite. So the simple, easy and hidden solution, that no-body mention for some reason, is apparently the best one. |
* Align main with changes needed for hybrid publish * remove unnecessary info * add relevant changes to the change log
* Align main with changes needed for hybrid publish * remove unnecessary info * add relevant changes to the change log
As it appear, altho commonjs cannot use ES modules - ES modules can use commonjs, with the limits that export default is emitted.
After trying every version of hybrid build, apparently the simplest option is the best one.
We build into commonjs, in our index.ts we are using export default, and the package can be used for all type of users.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.