Skip to content

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

Merged
benlesh merged 1 commit intoReactiveX:masterfrom
bcherny:master
Jul 29, 2018
Merged

fix(Observable): use more granular Observable exports in compat mode#3974
benlesh merged 1 commit intoReactiveX:masterfrom
bcherny:master

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