-
Notifications
You must be signed in to change notification settings - Fork 3k
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
rxjs-es es5 code with es2015 modules #1925
Comments
This very much is related to any action we would take in #1671 as well but not sure if there was a final verdict from there. That said, I believe the goal of rxjs-es was indeed to just be ES5.1 w/ ES6 modules, but it wasn't specifically stated AFAICT so this just wasn't thought about and not noticed because the angular peeps must have been running the code through a compiler that understood all ES6 features. |
Thanks @jayphelps, I will close this issue and post my comment there. Thanks, |
I think #1671 is talking about using rxjs to serve both They couldn't do this right now because the building facility still using TypeScript 1.8, which has to be upgrade to TypeScript v2 in order to generate ES5 code w/ ESM, that's PR #1968 currently on hold with other matter depends on merging. It'd be really helpful to have ES5 w/ ESM for Angular 2 users (or ES6 devs), because:
Right now during development stage, it really helps to use ES6 code without transpiler since it's perfectly fine to run in most browser, so as an experimental you could:
With setup above, everything works great. |
I agree with @imcotton. Thanks, |
I'm reopening this. I consider it a bug that it's not ES5 with ES2015 modules |
I think it'd be ideal if That way, for all of the Angular projects that depend on Thanks, |
I think the primary use-case for most people is having modules with es5 code for bunding and tree-shaking purposes. The minification angle is interesting, but seems edge-casey. |
We decided collective to stop publishing rxjs-es for now, and revisit publishing ES modules and/or entire ES6 code for future releases. We want to unblock v5 release and it's easier to publish something later than to commit to something for 5.0.0 and then change our minds. My gut tells me at the very least we'll publish ES modules somehow in the coming months, at the very least so we don't keep asked about it and tooling that expects it "just works". |
I believe issue itself is explained adequately, that we do no longer publish rxjs-es module issue itself does not exists anymore. As discussed in #2335 there are possibly lot of confusions of bringing es2015 modules package without finalized spec, while benefit is nearly non exist such as tree shaking's not working with Rx's codebase. This whole issue of publish native ES modules will be revisted with release planning once later. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The
.js
files inrxjs-es
contain es2015 code (let, const, arrow functions, etc). The es2015 module declarations are great for tree shaking but the code needs to be transpiled to es5 to be used by most browsers/apps.My use case was tree shaking out unused rxjs stuff from an Angular 2 library (Ionic Framework).
I reached out to Ben Lesh and he asked me to create an issue and link to the twitter discussion.
Thanks so much,
Dan
The text was updated successfully, but these errors were encountered: