Skip to content
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

fix(Observable): use more granular Observable exports in compat mode #3974

Merged
merged 1 commit into from
Jul 29, 2018

Conversation

bcherny
Copy link
Contributor

@bcherny bcherny commented Jul 29, 2018

Description: Use more granular exports in compat/Observable.ts to enable tree shaking optimization even if the consumer is compiling to CommonJS (instead of ES2015) modules.

Related issue (if exists): #3971

Importing Observable and calling Observable.create, with "module": "commonjs" vs "module": "es2015" in tsconfig.json:

Before patch

"module": "commonjs" "module": "es2015"
rxjs 79.6 KiB 14.7 KiB
rxjs-compat 80 KiB 80.1 KiB

After patch

"module": "commonjs" "module": "es2015"
rxjs 79.6 KiB 14.7 KiB
rxjs-compat 18.6 KiB 18.7 KiB

@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 96.923% when pulling 01e3414 on bcherny:master into eba335b on ReactiveX:master.

@benlesh
Copy link
Member

benlesh commented Jul 29, 2018

Great find, @bcherny!

@benlesh benlesh merged commit 3f75564 into ReactiveX:master Jul 29, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants