-
Notifications
You must be signed in to change notification settings - Fork 12k
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 lettable operators #8720
Comments
Functionally, this works great, my group is using it on multiple projects already. We have not yet verified whether the tree shakes correctly with CLI; hopefully someone from the team can answer that part. It should do so, but there could be some tweak yet needed. (If you need to deploy shortly in a case where the bundle size is vital, just try it and see if it affects your bundle size.) |
We have changed everything to lettable imports like this: import {map} from 'rxjs/operators'; No change in payload after migration. This is the reason I was asking. |
Both ways should support tree shaking. In my case I get a slight bundle size increase when importing from |
Shouldn't matter either way, but the terser version is way easier to maintain and read. Anyway, in RxJS 6 you'll be able to import everything from 'rxjs' which will be awesome if it can be properly tree shaken. |
@elvirdolic like @devoto13 said it should work correctly |
I also saw my bundle size increase by 10 KB as RxJS increased from 60 KB to 122 KB when using the new lettable operators. I also mentioned this in #8854 (comment). Still looking for the issue that is tracking this bundle increase bug. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
There are severals discussions around the rxjs imorts.
Does the CLI handle this correctly?
import {map} from 'rxjs/operators/map';
Vs
import {map} from 'rxjs/operators';
In which case does tree shaking work in CLI projects?
The text was updated successfully, but these errors were encountered: