Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

feat(bundle): Exposes an es2015 bundle #13

Closed
wants to merge 1 commit into from

Conversation

combmag-zz
Copy link

Updated the bundle so that it exposes both a commonjs module and an es2015 module. This will solve #12

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 515a539 on combmag:master into 687ea72 on njl07:master.

@akanass
Copy link
Owner

akanass commented Oct 16, 2017

Hello,

Thanks for your job but for me I don’t agree this PR because I create an UMD bundle that’s work with all types of environment.

I use it in webpack and he works fine or in Node.js and works too and in simple browsers.

You do a new bundle to fix a configuration problem and I don’t think it’s the good way.

And for es2015 module your target is es5 but in browser es2015 works now.

My bundle works so I think I’ll not merge this one that breaks browser standalone compatibility with node and other compilers

@akanass akanass self-assigned this Oct 16, 2017
@akanass akanass closed this Oct 16, 2017
@combmag-zz
Copy link
Author

this is done in most libraries that they expose both a commonjs/umd and an es2015 module.
This will allow the possibility to do better three shaking, also with re. to the browser, not all functions are yet supported in es2015. This also depend on the browser since IE doesn't support most of the es2015 features.

@akanass
Copy link
Owner

akanass commented Oct 16, 2017

If you include library in a Typescript project and use types defined inside, your project will work fine with your bundle.

If you include library inside a Node.js project, it will work fine too.

If you include library in standalone browser version, it will work fine again even in IE.

And if you include library inside another webpack project without Typescript but with a good config, it works too because some people did it.

I understand your point of view but before do it, I'm waiting of new rxjs bundle to be like them and support many types of bundle.

Get in touch and I'll link here the new version when it'll be released.

@akanass akanass mentioned this pull request Nov 14, 2017
akanass added a commit that referenced this pull request Nov 15, 2017
@akanass
Copy link
Owner

akanass commented Nov 15, 2017

@combmag new version publish to test new bundle in v2.7.0-rc.1 on tag next.

We've now commonjs on main component, es5 on module component and es2015 on es2015 component.

If you can try it and say me if it's ok, it'll be great.

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants