The patched operators aren’t tree-shakeable because their patching of Observable.prototype isn’t statically analyzable.

Have a look at this Rollup example. Note that neither the lettable nor patched map operators are used, but only the lettable operator is tree shaken. The patching of the prototype is a side effect of the import and there is no exported symbol to indicate whether — or where — it is used.

RxJS core team member; front-end developer; mentor; speaker; open-source contributor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store